Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Setting env vars in current process

by fruiture (Curate)
on Feb 11, 2003 at 19:18 UTC ( [id://234498]=note: print w/replies, xml ) Need Help??


in reply to Setting env vars in current process

That sentence in perlvar does not mean "changing %ENV only changes the environment of all children", it's more like "note that this will change the envirnonment of all your children".

Relax and test it, %ENV represents the current environmental variables of your process, without caveats.

#!/usr/bin/perl $ENV{FOO} = 1; print "\$ENV{FOO} is $ENV{FOO} still\n"; exec( '/usr/bin/env' );

The output of env will also mention "FOO" being "1".

--
http://fruiture.de

Replies are listed 'Best First'.
Re: Re: Setting env vars in current process
by ruscoekm (Monk) on Feb 11, 2003 at 19:29 UTC
    Ok, thanks. That's what I thought. I must be missing something else then (see reply above). Will reply if/when I find out!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found