> "HK" == H Kern writes:
HK> Just a followup on that last one...
HK> I'm using this code thinking that ($header{"info}) will be an array of
HK> all the elements in the string that was read in.
HK> But, when the perl compiler gets to the second print statement, it balks.
HK> "Can'
On 21/07/2011 05:34, H Kern wrote:
Just a followup on that last one...
I'm using this code thinking that ($header{"info}) will be an array of
all the elements in the string that was read in.
The first print statement does what I hope, printing out the elements of
that array as a string.
But, w
If you want to store an array inside a hash value you have to store a reference
to it, not the actual array. Here are two examples :
my %hash;
my @arr = split(...);
$hash{'key'} = \@arr;
Or shorter :
$hash{'key'} = [ split(...) ];
Cheers dude!
-- biskofski
Sent from my iPad
On Jul 20, 2011
Just a followup on that last one...
I'm using this code thinking that ($header{"info}) will be an array of all
the elements in the string that was read in.
The first print statement does what I hope, printing out the elements of
that array as a string.
But, when the perl compiler gets to