Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: use 'local' modifier to hashref element

by Anonymous Monk
on Jun 05, 2013 at 21:00 UTC ( [id://1037303]=note: print w/replies, xml ) Need Help??


in reply to Re^3: use 'local' modifier to hashref element
in thread use 'local' modifier to hashref element

Test it. It works. It is more reliable than manually restoring code because you don't have redundant code to mess up on, and because you don't have to worry about exceptions skipping that code. I've been using the trick since Perl 5.005. The ONLY type of scalar that you can't use local on is one defined with my. And that was rejected not because it was hard - it is easy - but because Larry Wall thought that it would confuse people to allow that.
  • Comment on Re^4: use 'local' modifier to hashref element

Replies are listed 'Best First'.
Re^5: use 'local' modifier to hashref element
by rovf (Priest) on Jun 10, 2013 at 13:26 UTC

    I tried - and to surprise, indeed, it worked!!!

    So once more I learned something new....
    -- 
    Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found