Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Making a hash of arrays from a while loop

by moritz (Cardinal)
on Mar 04, 2008 at 09:42 UTC ( [id://671833]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Making a hash of arrays from a while loop
in thread Making a hash of arrays from a while loop

You're right, and the workaround is to create a new array:
$hash{$key} = [ @array ];

If there are references inside the array, you'll need somthing like Storable::dclone.

Replies are listed 'Best First'.
Re^4: Making a hash of arrays from a while loop
by why_bird (Pilgrim) on Mar 04, 2008 at 09:47 UTC
    Ahh, that's what I was trying to do---I couldn't figure out how to make an anonymous array like that. Thankyou v much!
    ........
    Those are my principles. If you don't like them I have others.
    -- Groucho Marx
    .......

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-18 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found