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

it doesn't work. It is a separate context\shell
  • Comment on Re^2: Run system command in same context of the script itself

Replies are listed 'Best First'.
Re^3: Run system command in same context of the script itself
by LanX (Saint) on Apr 10, 2023 at 14:54 UTC
    > 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.