http://qs321.pair.com?node_id=217486


in reply to Calling Perl from Perl

Is there an easy way to call Perl scripts from within a Perl script and keep the environment variables?
I'm not sure how well this will work on your Window box but you could fork() then exec() your external scripts e.g
@ENV{qw/ one two three /} = qw( foo bar baz ); exec "perl somescript.pl" if fork();
Or you could just do() them in a separate package e.g
{ package RandomPkgName; do "somescript.pl"; }
The package declaration will avoid cluttering up your current namespace.
HTH

_________
broquaint