Do you know where your variables are? | |
PerlMonks |
Re: Open a .pl file form a .pl file (use do)by Flexx (Pilgrim) |
on Sep 18, 2002 at 16:17 UTC ( [id://198894]=note: print w/replies, xml ) | Need Help?? |
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,
In Section
Seekers of Perl Wisdom
|
|