Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

How to localize conditionally?

by saintmike (Vicar)
on Mar 13, 2011 at 19:52 UTC ( #892986=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        local $ENV{BLAH} = 42;
        libcall();
    ...
                print "env not set\n";
            }
        }
    
  2. or download this
        if( condition() ) {
            local $ENV{BLAH} = 42;
        }
        libcall();
    
  3. or download this
        if( condition() ) {
            local $ENV{BLAH} = 42;
    ...
        } else {
            libcall();
        }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2020-07-06 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?