Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Setting environment variables

by cat2014 (Monk)
on Feb 10, 2001 at 04:57 UTC ( [id://57536]=note: print w/replies, xml ) Need Help??


in reply to Setting environment variables

this is the way i've always done it in my scripts, when i didn't want to change the environment variable outside of the program:

{ local %ENV{NAME_OF_VARIABLE}="new-value"; #do whatever you want with the new environment in here }

you should make sure that you don't stomp on global environment variables by always changing the variable with local. if you're really sure that you want to do that, check out the node above. but i think that normally want to think twice about changing environment variables when the user doesn't expect it. -- cat

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-28 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found