On 5/1/06, Rance Hall <[EMAIL PROTECTED]> wrote:
assume the following code:

my $output = qx{systemcall};

assume that the output of the systemcall looks something like this

name\n
value\n
snip
what like to do is get the name/value pairs into a hash of some sort
snip

Why are you using a scalar?  This is the perfect place to use an array:

my @output = qx(systemcall};
chomp(@output);
my %hash = @output; #first val becomes key, second val, third key,
fourth, val, etc.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to