in reply to Run system command in same context of the script itself

See Shell::GetEnv or RE (tilly) 1: Get default login environment.

You will likely have to modify how you call your other command:

my $environment = readpipe("set WALLET=NO && set"); # parse environment from $environment

Replies are listed 'Best First'.
Re^2: Run system command in same context of the script itself
by LanX (Saint) on Apr 10, 2023 at 12:57 UTC
      The requirement is to set the variable and ran a command that utilizes that variable. What i'm doing is setting the vriable which allows connecting to oracle DB, and then connecting to the DB to make some query.