in reply to Exit With Line Number

My personal favorite way to do this is to use "warn"

warn 'Exit' and exit;

Will produce:

Exit at (whatever).pl line (whichever).

Replies are listed 'Best First'.
Re^2: Exit With Line Number
by revdiablo (Prior) on May 05, 2005 at 18:04 UTC

    The only time this would be preferable over die, is when you want to return a specific exit code. Otherside, it's just overly verbose.

      Mostly true, though it's also useful when working with Tk, where a simple die often produces warnings about improper program termination.