I am creating a regression system (not unit testing) for some Perl scripts.
The main component of the system is
`perl script.pl @params 1>stdoutfile 2>stderrfile`;
However, in the process of working on scripts, they sometimes do not compile (Shock!). But perl itself will execute correctly. However, I do not know how to detect on stderr whether Perl failed to compile (and therefore wrote stderr), or my script barfed at the input (and therefore wrote stderr).
How to determine if a program was executed or not without exhaustively searching for Perl error messages and grepping the stderr file?
source
share