This is not a Perl questions, this is a csh question.
Perl 5.8.8 on Linux RHEL 5.5.56.
I have a test Perl program which uses 'exit 3;' to set the exit status. The Perl program is run from a csh script I call 'test'.
# July 11, 2014
# Test exit code with csh $status variable
print "$0 Exit with error code $i\n";
# July 10, 2014,
if ($status > 0) then
echo "ERROR in status: $status"
echo command succeeds, resetting
$status to 0. Thus
if never sees nonzero
Therefore the solution is to either eliminate the
echo command or save the value of
$status immediately after the
I recently encountered a similar issue myself.