Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Shallow vs deep copy (Was Re^3: hash ref mind blow)

by ikegami (Patriarch)
on Sep 25, 2008 at 21:40 UTC ( [id://713753]=note: print w/replies, xml ) Need Help??


in reply to Re: Shallow vs deep copy (Was Re^3: hash ref mind blow)
in thread hash ref mind blow

local our %copy; *copy = \%hash;

should be

our %copy; local *copy = \%hash;

Or if you prefer,

local *copy = \%hash; our %copy;

What's the point of localizing %copy? Depending on whether you do it before or after the aliasing, you either localize a variable you never use, or you localize %hash.

But you do modify *copy, so you should localize that.

I want to know what package does those hash textgraphs you posted.

Notepad.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2026-02-18 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.