Path: utzoo!attcan!uunet!world!decwrl!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: return from main Message-ID: <9859@jpl-devvax.JPL.NASA.GOV> Date: 8 Oct 90 16:42:11 GMT References: <106927@convex.convex.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 22 In article <106927@convex.convex.com> tchrist@convex.Com (Tom Christiansen) writes: : Trying to return from main causes an error message. : : perl -e 'return 1' : Bad label: _SUB_ at /tmp/perl-e025554 line 1. : : I would like to see a return from main to be the : same as exit, just as it is in C. Why? Using "return" when you mean "exit" does not enhance readability. : In any event, it shouldn't complain about a Bad Label. : : --tom : : ps: I'm at Patchlevel 18. Obviously. This was "fixed" in patch 19. It now says Can't return outside a subroutine at /tmp/perl-e025554 line 1. Larry