Re: [Boston.pm] environment variables that stick

2003-01-16 Thread Ron Newman
You *could* have the perl script set all of the environment variables, then exec a new shell. ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm

Re: [Boston.pm] environment variables that stick

2003-01-16 Thread Charles Reitzel
At 09:51 AM 1/16/2003 -0500, [EMAIL PROTECTED] wrote: Hanes, Philipp wrote: Probably not. Hi Philipp, how're things? That's a bummer. TMTOWTDI becomes NCD - No Can Do If it is any consolation, it isn't Perl's fault. It is inherent in the nature of parent/child processes. The child

Re: [Boston.pm] environment variables that stick

2003-01-16 Thread Paul Makepeace
On Thu, Jan 16, 2003 at 09:59:52AM -0500, Ron Newman wrote: You *could* have the perl script set all of the environment variables, then exec a new shell. Abigail came up with quite a neat move involving a double exec written up on Fun With Perl list. In hir own words, From: abigail[at]foad.org

Re: [Boston.pm] environment variables that stick

2003-01-16 Thread Ron Newman
Unix folks are used to these limitations on how you can use environment variables. Do things work the same way in Windows? ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm

Re: [Boston.pm] environment variables that stick

2003-01-16 Thread John Abreau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Content-Type: text/plain; charset=us-ascii Charles Reitzel [EMAIL PROTECTED] writes: [snip] BEGIN { $HomeDir = '/usr/local/foo'; $Foo = 'foo'; @Bar = ( qw(Foo Baz Bar) ); %Baz = { Foo = $Foo, Bar = \@Bar }; } [snip] The %Baz is

Re: [Boston.pm] environment variables that stick

2003-01-15 Thread Ronald J Kimball
On Wed, Jan 15, 2003 at 11:36:29AM -0500, [EMAIL PROTECTED] wrote: I want to write a perl script to replace a Unix shell script which does nothing other than create and set environment variables. So the perl script might look something like this: $ENV{GREGSVAR}='Hello'; except that

RE: [Boston.pm] environment variables that stick

2003-01-15 Thread Hanes, Philipp
Probably not. Depending on the script you're trying to replace (really, depending on the shell it's supposed to run under) you'll find that it is sourced in some way... Which means that the commands are really executed in the initial shell, rather than a subshell/child process (which is what

Re: [Boston.pm] environment variables that stick

2003-01-15 Thread Doctor Vince
It strikes me that 'exec' replaces the current process with another process, I believe inheriting the existing environment. You miht try making the last line of the perl script : exec your follow-on process here so that it gets the environment that you set within the script. Vince On