Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Copy of an anonymous hash?

by tphyahoo (Vicar)
on Apr 26, 2005 at 14:16 UTC ( [id://451580]=note: print w/replies, xml ) Need Help??


in reply to Re: Copy of an anonymous hash?
in thread Copy of an anonymous hash?

I believe
my $new_element = \%{$hash_array[$index]};
would also work. (Right?)

UPDATE: I meant, my referencing syntax would work as well as hollis. This is right... right?

Replies are listed 'Best First'.
Re^3: Copy of an anonymous hash?
by Fletch (Bishop) on Apr 26, 2005 at 15:04 UTC

    Nope, it'll still point to the same underlying hash.

    freebie:~ 702> perl -le '$a={qw(a b)};$b=\%{$a};print "$a\t$b"' HASH(0x804c844) HASH(0x804c844)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found