foo.pl: $ENV{FOO} = 'bar'; system 'perl bar.pl'; print `perl bar.pl`; bar.pl: print "I got $ENV{FOO}\n";