Dear monks,
I'm writing a Perl pipeline which consists of a script executing other scripts (Perl and non-Perl). My question:
Say I have scriptA.
ScriptA executed well and returns valueX that will act as input of scriptB.
But suppose, there was a problem in the execution of scriptA and it did not return valueX, what would be the best way (command) to make my pipeline die?
I tried:
system($scriptA);
#? == -1 ? die "Command failed: $!\n" : print "Command executed succes
+sfuly\n";
This line works fine if I called a command that does not exists (script will die), but I believe that proceeding this way do not make the script die if the command is found and called but not executed because of wrong/absent arguments...?
Thanks,