in reply to Help needed to understand hashes and hashes of arrays
It looks like you want a hash of array references, and in fact you came close. The flaw is when you tried to add to the array:
# Bad - creates a new copy of the array. #@someArray = @{ $textHash{$da} }; #push @someArray , @textarray; # Do this instead. This adds more to the referenced array. push @{ $textHash{$da} }, @textarray;
|
---|
In Section
Seekers of Perl Wisdom