in reply to perl program return error code to ksh
-
returns a 0 error code even with a die statement
I'm pretty sure die is returning a nonzero value. That's how it is designed. Here is what I mean:
As mentioned elsewhere the Perl script may be getting executed in such a way that the return code is obfuscated. Something like:~# perl -e 'die "trying"' trying at -e line 1 ~# echo $? 255
What does the sniglet of shell code look like that is invoking the Perl script?myscript.pl | do_something
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
In Section
Seekers of Perl Wisdom