in reply to Re^4: new shell - perl
in thread new shell - perl

You don't have to create a new shell in the script that changes the environment:
# File foo.pl: $ENV{FOO} = 'bar'; exec 'perl', 'bar.pl'; # File bar.pl: print $ENV{FOO}, $/; # launch it: $ perl foo.pl bar