in reply to A Luser's Benchmarking Tale

I realise that this is only test code, but there is no reason to use a label in your example.

P:\test>perl -le" { print 1; last if 1; print 2; } print 3;" 1 3

last on it's own will exit closest encompassing loop, even if that loop is a bare block (except when it doesn't, like sort and map blocks etc.). A non-labelled last is considerably more efficient than a labelled one, and with care, there are very, very few situations where a labelled jump is necessary.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!
Wanted!