in reply to Open a .pl file form a .pl file
If you want to execute an external perl script, you can use the
do EXPRcommand (check your perldoc -f do).
This will evaluate EXPR and take it's result as the filename to execute.
You should not use qx`` (backticks), unless you need to pass arguments, or need control over the scripts output. It's more expensive than just do-ing the script. Apart from the pipeing overhead, calling the other script using backticks would start another perl instance to run it -- which will demand extra memory, of course.
Same applies to opening a pipe to the external script, the way kabel sugested. Update: You only want to use pipes if you need to input to the other script's STDIN.
So long,
Flexx
|
---|
In Section
Seekers of Perl Wisdom