Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: one hash value (array) into another

by duff (Parson)
on Jan 06, 2004 at 18:29 UTC ( #319195=note: print w/replies, xml ) Need Help??


in reply to one hash value (array) into another

It all depends on what you mean by "equivalent". To copy the contents of the array, you would do

$hash{'two'} = [ @{$hash{'one'}} ];

To make sure that they both reference the same array, just

$hash{'two'} = $hash{'one'};

I assume that you mean the former though.

Update: /me suddenly experiences a strange sense of deja vu and decides he needs to type faster or notice newer nodes sooner or both :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2021-07-30 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?