As usual with perl, there is more than one way to do it. You might just use system to call a new perl process, but the more standard way to do it would be to use do. You can set @ARGV to define the parameters for the other scrips.
If other_script returns a true value (eg: the last line in other_script.pl is "1") then you can write:{ local @ARGV = ("Two", "Parameters"); do "other_script.pl"; } #here other_script's execution is done
Error information will likely be in $@, but you might need to check $!, read do's documentation for more detail.{ local @ARGV = (); do "other_script.pl" or die "Other script failed: $@"; }
Edit: the advantages of do over system are that it does not create a separate perl process, and the output is usable as perl data.
In reply to Re: Perl Script to Run other Scripts with proper pauses?
by Eily
in thread Perl Script to Run other Scripts with proper pauses?
by adamZ88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |