![]() |
|
XP is just a number | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
I think the bit you're missing is that a reference is a scalar. So instead of this: while ( ($key, @value) = each %id_veritasHash){You need this: while ( ($key, $value) = each %id_veritasHash){Then to loop through the items in the array that the scalar $value references, instead of this: foreach $temp (@value){You need this: foreach $temp (@$value){The final bit of the puzzle is that each of your references points to the same array (the output from your code shows the same hex value in the stringified reference). To create a different array each time through the loop, instead of this: @data = split /\t/, $line;You need this: my @data = split /\t/, $line;There are other ways to create new arrays, which you can read about in perlreftut. In reply to Re: Hash of arrays
by grantm
|
|