Re: unsetenv in the shell
- From: Jürgen Exner <jurgenex@xxxxxxxxxxx>
- Date: Sun, 02 Mar 2008 12:04:35 GMT
Si <smcbutler@xxxxxxxxx> wrote:
hi, i have a perl program that calls another application. this second
application uses the value of certain environment variables during its
operation. i'm having trouble with unsetting those variables during
the course of the perl script.
my (wrong) pseudo code:
$var1 = $ENV{'VAR1};
$var2 = $ENV{'VAR2'};
$var3 = $ENV{'VAR3'};
system( "unsetenv VAR1");
system( "unsetenv VAR2");
system( "unsetenv VAR3");
"Unsetting" an environment variable is in no way different from setting it.
Your case is a variation of the FAQs:
I {changed directory, modified my environment} in a perl script. How come
the change disappeared when I exited the script? How do I get my changes to
be visible?
Just do those changes in the script itself instead of in a child process
(perldoc -f delete)
jue
.
- References:
- unsetenv in the shell
- From: Si
- unsetenv in the shell
- Prev by Date: Re: unsetenv in the shell
- Next by Date: Re: unsetenv in the shell
- Previous by thread: Re: unsetenv in the shell
- Next by thread: Re: unsetenv in the shell
- Index(es):
Relevant Pages
|
|