in reply to How to execute a Korn shell ". <some-file>" from within Perl

Run your command, then run printenv, capture the output, and set the environment variables from within perl (untested):
/^(\w+)=(.*)/ and $ENV{$1} = $2 for qx( . oraenvcommand printenv );
This breaks on variables with newlines in the value...

Update: Told you it was untested. Fixed code. Still untested. As suggested below, it would be better to run the command before your perl script executes, if at all possible.

Replies are listed 'Best First'.
Re: Re: How to execute a Korn shell ". <some-file>" from within Perl
by blink (Scribe) on Jan 30, 2003 at 06:10 UTC
    Thanks for the reply, but it didn't work. It's still not executing.