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 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_VAR='Some value'");
> 
> ...but didnt work either.
> 
> Regards,
> Torbjørn Lindahl
> 
> _______________________________________________
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
begin:vcard 
n:Bell;Bayard
tel;work:(212) 762-1035
x-mozilla-html:TRUE
org:Morgan Stanley;Distributed Systems Integration
version:2.1
email;internet:[EMAIL PROTECTED]
title:UNIX Dork
adr;quoted-printable:;;9th Floor=0D=0A750 Seventh Avenue=0D=0A;New York;NY;10019;USA
x-mozilla-cpt:;-19088
fn:Bayard G. Bell
end:vcard

Reply via email to