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.

Reply via email to