in reply to Exiting script from subs

I would personally not want to hide an exit statement inside a block like that.
It strikes me that what you want is for the program to end (as opposed to abend) based on certain criteria.
This makes it look a little like this:
my $result = do_task(); exit() if ($result eq 'exit'); sub do_task { ... do something... if ($somecondition) { return 'exit'; } }
Obviously the string 'exit' is not that desirable (and for the sake of your example), but the return code should depend on what the function does (and allow for further scope).