Still present in 5.12.0 RC0. On Tue Mar 28 03:39:19 2000, tchrist@chthon.perl.com wrote: > From a CHECK{}, you cannot exit(0). You may exit !0, but not 0. > If you put this in /tmp/a and run it: > > #BEGIN { warn "testing exit from BEGIN"; exit } > #BEGIN { warn "testing exit N from BEGIN"; exit 1 } > > #INIT { warn "testing exit from INIT"; exit } > #INIT { warn "testing exit N from INIT"; exit 2 } > > CHECK { warn "testing exit from CHECK"; exit } > #CHECK { warn "testing exit N from CHECK"; exit 3 } > > #END { warn "testing exit from END"; exit } > #END { warn "testing exit N from END"; exit 4 } > > print "i am now the main program\n"; > warn "testing exit 5 from main"; > exit 5; > > die "XXX"; > > You will get: > > % perl /tmp/a > testing exit from CHECK at /tmp/a line 7. > i am now the main program > testing exit 5 from main at /tmp/a line 14. > Exit 5 > > If you switch the comment on the two CHECKs, you get > > % perl /tmp/a > testing exit N from CHECK at /tmp/a line 8. > Exit 3 -- Alexandr Ciornii, http://chorny.netThread Previous | Thread Next