in reply to How a baisc debugging effort restored my sanity!

Lesson Also Learned

Don't bury exit deep in your subroutines; use next/last ... then return out of your subroutine, then exit your program

use MyStuff 'MyThingWhichUsedToExitButNowReturns'; exit MyThingWhichUsedToExitButNowReturns();

Replies are listed 'Best First'.
Re^2: How a baisc debugging effort restored my sanity!
by cavac (Prior) on Mar 01, 2011 at 21:29 UTC
    For this deep-in-the-code stuff i usually use croak. Especially for one-off stuff that *probably* no one but me will ever use. This raises awareness of the problem, without having to implement a gazillion of error handling stuff beforehand for software that's only meant to be run by the developer him/herself.