Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: calling a perl script within a perl scriptby sgifford (Prior) |
on Nov 27, 2005 at 04:24 UTC ( [id://511987]=note: print w/replies, xml ) | Need Help?? |
Also, your || die is tricky. If your test_script.pl returns a zero then it will die.It's actually even trickier. Since the backticks will return the output of the script, if the script doesn't output anything, the main program will die. system is definitely better than backticks if you don't care about the output. If you care about speed, consider using do 'filename.pl', which will avoid firing up a new Perl interpreter. You may have to set @ARGV manually to make this work.
In Section
Seekers of Perl Wisdom
|
|