Re: exit status
- From: Andrzej Adam Filip <anfi@xxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 17:59:33 +0200
"Jerry Adair" <jerry.adair@xxxxxxx> writes:
Ok I'll keep with my vane of asking potentially obvious questions.
I am attempting to return an error code from a Perl script. At first blush,
it seemed easy with the exit() call. But it doesn't work. Just out of
frustration I tried a return() call, and I got the correct return code,
albeit with an error message about returning from a non-subroutine.
The code I had was simple enough:
exit(status( <blah blah blah> ));
How do you test the value of exit code?
[ What OS do you use? ]
It *works* as expected on my linux:
perl -e 'exit 2' ; echo $?
--
[pl2en Andrew] Andrzej Adam Filip : anfi@xxxxxxxxxxxx : anfi@xxxxxxxx
http://anfi.homeunix.net/
.
- References:
- exit status
- From: Jerry Adair
- exit status
- Prev by Date: exit status
- Next by Date: Re: Find duplicates in a dat file
- Previous by thread: exit status
- Next by thread: Re: exit status
- Index(es):
Relevant Pages
|