develooper Front page | perl.perl5.porters | Postings from March 2000

loop label (diag only?) bug

From:
Tom Christiansen
Date:
March 22, 2000 08:19
Subject:
loop label (diag only?) bug
Message ID:
26685.953741938@chthon
This:

    $lab = "INNER";

    OUTER: for (1..4) {
	INNER: for (1..4) {
	    last $lab;
	} 
	print "Done with INNER\n";
    } 
    print "Done with OUTER\n";

Says 

    Label not found for "last " at /tmp/a line 5.
    Exit -1

Which is quite different from what you'd get if you had
said "last BAD" there instead:

    Label not found for "last BAD" at /tmp/a line 5.

The missing piece after the last in the first message seems wrong.

I'd also like to know why Perl let me compile something that it
had no intention of honoring. :-(

--tom



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About