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


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 EXPR

command (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