Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Exiting script from subs

by ChemBoy (Priest)
on Apr 15, 2005 at 22:41 UTC ( [id://448369]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Exiting script from subs
in thread Exiting script from subs

Exponentially faster? Only if your code isn't actually doing anything other than test exit conditions inside that loop, I'd think. The maintainability benefit, on the other hand, is gigantic, though I'd use Perl's last LABEL; construct (with a label on the outer loop) rather than a literal goto (I personally find this a much tidier mechanism, though I realize that they're fundamentally pretty much equivalent).

And not, of course, that I would disagree with the statement that both that article headline in particular (usually without the link) and "$foo considered harmful" in general are employed in many places where they probably shouldn't be—just wanted to throw in some minor quibbles on the specifics.



If God had meant us to fly, he would *never* have given us the railroads.
    --Michael Flanders

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://448369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found