S
Sean
I know "eval" and "if ($@)" is the equivalent of a try/catch in the C
programming world. My question is how to basically throw an error in
one perl script that can be caught by another? For example:
ScriptA.pl:
-----------
typical perl code but when we are done, do we exit, die, or warn so
that ScriptB.pl can pick it up? EX:
ScriptB.pl
-----------
eval {
`ScriptA.pl`
};
if ($@) {
print "Errors occured: $@";
} else {
print "ScriptA ran perfectly!";
}
The question is how to force an error/exit code in ScriptA so that
ScriptB picks it up? I keep getting everything ran ok because
technically ScriptA "can run"... it's just that I can't throw an error
up a level. Thanks all!
Sean
programming world. My question is how to basically throw an error in
one perl script that can be caught by another? For example:
ScriptA.pl:
-----------
typical perl code but when we are done, do we exit, die, or warn so
that ScriptB.pl can pick it up? EX:
ScriptB.pl
-----------
eval {
`ScriptA.pl`
};
if ($@) {
print "Errors occured: $@";
} else {
print "ScriptA ran perfectly!";
}
The question is how to force an error/exit code in ScriptA so that
ScriptB picks it up? I keep getting everything ran ok because
technically ScriptA "can run"... it's just that I can't throw an error
up a level. Thanks all!
Sean