Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 romping around the Monastery: (7)
As of 2016-06-26 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (330 votes). Check out past polls.