SPUG: Perl and setting environment variables
Timm Gleason
timm at gleason.to
Tue Sep 10 14:37:55 CDT 2002
I see that there a explicit tools for importing and manipulating
environment variables with Perl, but I need to set them from with a Perl
script and have them passed to all subsequent child processes and shells
that may be executed just as if they were set before the script was
executed.
It was recommended that I use a shell script to set all the EVs and then
invoke the Perl script, however, I do not have all the EV values until
after the script is executed.
I have set them in the script
$ENV{"CVSROOT"} = $CVSROOT;
$ENV{"TMPDIR"} = $TMPDIR;
$ENV{"DIST_ROOT"} = $DIST_ROOT;
$ENV{"BuildNumber"} = $BuildNumber;
but when I execute a command outside of the script, such as with a
system(), the EVs do not get inherited by the child process.
Tuesday, September 10 2002
-- | To be, or not to be. *BOOM!* Not to
Timm Gleason | be.
http://www.gleason.to/ |
http://www.uranushertz.to/ |
Quis custodiet iposos custodes? |
-----PGP PUBLIC KEY BLOCK AVAILABLE-----
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list