Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Help needed to understand hashes and hashes of arrays

by tall_man (Parson)
on Apr 04, 2005 at 15:04 UTC ( #444709=note: print w/ replies, xml ) Need Help??


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;


Comment on Re: Help needed to understand hashes and hashes of arrays
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://444709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2014-07-23 03:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (131 votes), past polls