in reply to Re: Re: using exit and number 1 at end of file
in thread using exit and number 1 at end of file

Non-zero return values are useful when you're using perl in a shell script, where a zero exitcode means 'true' and non-zero exitcodes generally signal various kinds of error condition.

For example, in Bash you might want to do:

  if findfile.pl; then (something) fi

and make findfile.pl return >0 if it doesn't find a file.

Zarni-oh-no-this-is-PERLmonks-isn't-it-woop