Dan Muey wrote: > > > Thomas Browner wrote: > > > > > > Could some one show me an example of a labeled block (goto)? > > > > perlsyn.pod has many examples of labeled blocks > > > > perldoc perlsyn > > This thread got me thinking.
"Thread"? Since your MUA doesn't provide a "References:" header it is not part of any "thread". Also your MUA seems to have elided any attribution to the text I typed above. > Just for the info, with mod_perl it can be bad to call exit() as you may kill apache. > > So instead of exit what would be wrong or right/pro or con of doing this: > > Instead of this: > if($evilthings) { exit; } > > Do this, put QUIT: as the very last line of the script > Do > if($evilthings) { goto QUIT; } > > Any comments? An early exit is frowned upon but a goto is just plain evil, this isn't BASIC. :-) > Just wondering since I never use goto() or exit() but wanting to expand my brain a > bit. Most perl programs are short enough that exiting/returning early is not a big problem. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]