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

Re^5: How to localize conditionally? (tias)

by tye (Sage)
on Mar 14, 2011 at 16:18 UTC ( #893103=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to localize conditionally? (tias)
in thread How to localize conditionally?

My tests appeared to work for strange reasons. Sorry about that. But you can fix the original without copying the whole environment:

local $ENV{BLAH}; if( @ARGV ) { $ENV{BLAH}= 42; } else { delete $ENV{BLAH}; }

- tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2020-07-14 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?