Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: GOTO considered (a necessary) evil?

by Abigail-II (Bishop)
on Jul 16, 2002 at 09:25 UTC ( #182025=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: GOTO considered (a necessary) evil?
in thread GOTO considered (a necessary) evil?

This typo generates an error...
perl -le 'BAR: print 1; BAZ: for (2..3) {print; redo BAR; }'
This typo causes an infinite loop...
perl -le 'BAR: print 1; BAZ: for (2..3) {print; goto BAR; }'
That's a pretty weak example, because if you omit the typos, both
perl -le 'BAR: print 1; BAZ: for (2..3) {print; redo BAZ; }'
and
perl -le 'BAR: print 1; BAZ: for (2..3) {print; goto BAZ; }'
behave identically - looping infinitely.

Abigail


Comment on Re: GOTO considered (a necessary) evil?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-08-28 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls