... that this would work?
SKIP: {
print "first\n";
SKIP: {
print "second\n";
SKIP: {
print "third\n";
last SKIP;
print "shouldn't print\n";
}
print "leaving second\n";
}
print "leaving first\n";
}
with output
first second third leaving second leaving firstNot only does it compile, but it works as you'd expect: the last leaves only the innermost SKIP block. Or maybe I should say "it works the way I want it to".
Re:Never read the llama, I take it?
pemungkah on 2006-03-07T19:09:50
Actually, I haven't. I went straight from Pink Camel to Blue Camel via man page, so I've probably missed a few interesting items here and there...
Looking back, it's not so surprising - I knew that last was pretty intelligent in its behavior, and that it was perfectly OK to have the same label in a program multiple times (e.g - multiple SKIP blocks in a test). I just hadn't explicitly nested multiple identical labels before, and was quite pleased that it worked, since I need it to.