Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Invoking Perl script from a perl script

by rafl (Friar)
on Oct 30, 2006 at 05:31 UTC ( #581210=note: print w/replies, xml ) Need Help??


in reply to Invoking Perl script from a perl script

You could use do or require or eval combined with something that reads the file to execute. Safe is a slightly other way to eval some code. Another way, if you don't want to run the other script in the same interpreter as the current one, is to use system or something similar combined with $^X:

system($^X, 'other_perl_script.pl', 'foo', 'bar');

Cheers, Flo

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2016-09-30 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (562 votes). Check out past polls.