On 7/5/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
I am reading perldoc.perl.org and am not understanding exit and die clearly.
If I have a conditional in a sub that I want to validate with, what is the
correct way to do the following:
1. End the sub and return back to the script without continuing that sub.
2. End the entire script without *any* further execution.
How do I write this?
snip
1. can be done with return (read perldoc -f return)
2. can sort of be done*, you can exit a script with exit() (see
perldoc -f exit), die (see perldoc -f die), or croak (see perldoc
Carp).
* At the end of script any END {} blocks that have been defined will
execute (in reverse order of definition). So far as I know there is
no way to skip the execution of END {} blocks, so you cannot end the
script without *any* further execution.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/