On Wed, 23 Aug 2000 17:24:23 -0600 (MDT), Nathan Torkington wrote: >Compile the main() program code into a subroutine called 0, and you're >off! > > &0 anyone? :-) > >(that's digit 0, by analogy to $0) What would be nice about this, is that then you could use "return" in a script to stop execution. I don't like "exit", because you can't trap it, if ever you wrap the code in another script. open OUT, ">do.pl"; print OUT "exit\n"; close OUT; print "before\n"; do "do.pl"; print "after\n"; Or, "die" should have a way of stopping the program without a warning message. -- Bart.
- Re: Things to remove Dan Sugalski
- Re: Things to remove Larry Wall
- Re: Things to remove Buddha Buck
- Re: Things to remove Bryan C . Warnock
- Re: Things to remove Damian Conway
- &ME David L. Nicol
- Re: Things to remove Dan Sugalski
- Re: Things to remove Nathan Torkington
- Exception handling [Was: Re: Things to re... Bart Lateur
- Exception handling [Was: Re: Things t... Glenn Linderman
- Re: Exception handling [Was: Re: Thin... Markus Peter
- Re: Exception handling [Was: Re: Thin... Dan Sugalski
- Re: Exception handling [Was: Re: Thin... Tony Olekshy
- Re: Exception handling [Was: Re: Thin... Glenn Linderman
- Re: Exception handling [Was: Re: Thin... Tony Olekshy
- Re: Exception handling [Was: Re: Thin... Glenn Linderman
- Re: Exception handling [Was: Re: Thin... Tony Olekshy
- Re: Exception handling [Was: Re: Thin... Glenn Linderman
- Re: Exception handling [Was: Re: Thin... Glenn Linderman