Hallo everyone,
I have a perl script which can return error codes. I have done this with, for example, 'exit 11;', which would (I imagine) send the exit code 11 (instead of 0) back to the calling program.
I would now like to check that my error codes are being returned correctly and so wanted to write a short script to test this. Here I considered using the following ...
$checkexitcode = system ("perl myscript.pl");
but believe that this will simply catch the return/exit code from 'system' or from 'perl' and not the return code from 'myscript.pl'.
Can anyone help me with this? Maybe you already have a simple script to test for return codes?
Many thanks,
Alan Searle.
I have a perl script which can return error codes. I have done this with, for example, 'exit 11;', which would (I imagine) send the exit code 11 (instead of 0) back to the calling program.
I would now like to check that my error codes are being returned correctly and so wanted to write a short script to test this. Here I considered using the following ...
$checkexitcode = system ("perl myscript.pl");
but believe that this will simply catch the return/exit code from 'system' or from 'perl' and not the return code from 'myscript.pl'.
Can anyone help me with this? Maybe you already have a simple script to test for return codes?
Many thanks,
Alan Searle.
Comment