Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Calling Perl from Perl

by broquaint (Abbot)
on Dec 04, 2002 at 14:25 UTC ( #217486=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217486]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-01-20 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?