in reply to Re: Re: GOTO considered (a necessary) evil?
in thread GOTO considered (a necessary) evil?
This typo generates an error...That's a pretty weak example, because if you omit the typos, bothThis typo causes an infinite loop...perl -le 'BAR: print 1; BAZ: for (2..3) {print; redo BAR; }'perl -le 'BAR: print 1; BAZ: for (2..3) {print; goto BAR; }'
andperl -le 'BAR: print 1; BAZ: for (2..3) {print; redo BAZ; }'
behave identically - looping infinitely.perl -le 'BAR: print 1; BAZ: for (2..3) {print; goto BAZ; }'
Abigail
|
---|
In Section
Meditations