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

do some perl commands; #this command needs env variable WALLET=NO to be set

I would think that, before your script runs those perl commands, it can just specify:
$ENV{'WALLET'} = 'NO';
Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Run system command in same context of the script itself
by igorle (Initiate) on Apr 10, 2023 at 14:44 UTC
    it doesn't work. It is a separate context\shell
      > it doesn't work.

      use v5.12.0; use warnings; $ENV{BLA} = "YOU ARE MISTAKEN"; system('echo %BLA%'); # $BLA for linux,et al

      > perl.exe -w d:/Perl/pm/t_system.pl YOU ARE MISTAKEN

      Cheers Rolf
      (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
      Wikisyntax for the Monastery

        Thank you so much! It works for me.