Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stl!stc!graham From: graham@tcom.stc.co.uk (Graham Bardsley) Newsgroups: comp.lang.perl Subject: next label not reported as a bad label in BLOCK Message-ID: <1991Jun13.092118.308@tcom.stc.co.uk> Date: 13 Jun 91 09:21:18 GMT Sender: news@tcom.stc.co.uk (System Administration) Organization: BNR Europe, New Southgate, London, N11 1HB Lines: 40 Perl doesn't complain that having a 'next' statement inside a plain block is an invalid use of next. This has I think been a long-standing `feature' since after finding a use of it in an old perl program of mine a bug has disappeared. Since perl complains about bad label usage everywhere else shouldn't it also complain about using next in this way? An example session is given below... Cheers. newt$ cat bug.pl #! /usr/local/bin/perl $i=0; lab: { print "\$i=$i\n"; $i++; next lab if ($i < 10); } newt$ perl bug.pl $i=0 newt$ perl -v This is perl, version 4.0 $RCSfile: perl.c,v $$Revision: 4.0.1.3 $$Date: 91/06/07 11:40:18 $ Patch level: 9 Copyright (c) 1989, 1990, 1991, Larry Wall Perl may be copied only under the terms of the GNU General Public License, a copy of which can be found with the Perl 4.0 distribution kit. newt$ -- Graham Bardsley,NT Europe Ltd,Oakleigh Road South,New Southgate,London, N11 1HB ..{uunet,mcsun}!ukc!stc!graham Tel: +44 81 945 3799 And compact ISO10021 address is probably something like: I=G/S=Bardsley/OU=lon4021/O=stc telecommunications/P=stc plc/A=gold 400/C=GB