RE: [Perl-unix-users] setting environmental variables

2002-11-07 Thread Rumpf, Christopher
inal Message- > From: Bayard Bell [mailto:Bayard.G.Bell@;morganstanley.com] > Sent: Wednesday, November 06, 2002 1:38 PM > To: Torbjørn Lindahl > Cc: [EMAIL PROTECTED] > Subject: Re: [Perl-unix-users] setting environmental variables > > > This can't work. Perl is

Re: [Perl-unix-users] setting environmental variables

2002-11-06 Thread parvez
Hi, Could try this out: ## code start #!/usr/bin/perl BEGIN { $ENV{MY_VAL} = 'This is It'; } print "ENV = ",$ENV{MY_VAL},"\n"; ## code ends Parvez ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveSt

RE: [Perl-unix-users] setting environmental variables

2002-11-06 Thread Torbjørn Lindahl
ber 06, 2002 1:38 PM > To: Torbjørn Lindahl > Cc: [EMAIL PROTECTED] > Subject: Re: [Perl-unix-users] setting environmental variables > > > This can't work. Perl is running as a child process. Parents can't inherit > the environments of their children. Enviro

RE: [Perl-unix-users] setting environmental variables

2002-11-06 Thread Rumpf, Christopher
-Original Message- From: Bayard Bell [mailto:Bayard.G.Bell@;morganstanley.com] Sent: Wednesday, November 06, 2002 1:38 PM To: Torbjørn Lindahl Cc: [EMAIL PROTECTED] Subject: Re: [Perl-unix-users] setting environmental variables This can't work. Perl is running as a child process. Pa

Re: [Perl-unix-users] setting environmental variables

2002-11-06 Thread Bayard Bell
This can't work. Perl is running as a child process. Parents can't inherit the environments of their children. Environment settings can only be propagated to children. Torbjørn Lindahl wrote: > > Hi list, > > how can I set an environmental variable from within perl - so that it will > be vali

[Perl-unix-users] setting environmental variables

2002-11-06 Thread Torbjørn Lindahl
Hi list, how can I set an environmental variable from within perl - so that it will be valid after the perl script has completed as well? i have done the following... $ENV{'MY_ENV_VAR'}="Some value"; ...and in shell... echo $MY_ENV_VAR ...but no good. I also tried... system("export MY_ENV_V