in reply to Go to?
The truth is that goto is a tool in the perl arsenal that can be used for good and evil. If anyone here is writing code that isn't indented properly, or relies on side effects from operations, or indeed doesn't parenthesise their arithmetic and logical instructions to prevent unexpected order of evaluation then they, too, should be viewed with disdain from the goto purists.
At least the thread author made a good attempt to justify the reason for needing goto; indeed the author needn't have justified anything. Perl has a goto statement and thus that's reason enough to be allowed to use it.
As a final note, I don't remember the last time I used goto in Perl or C programming (thought I've used it liberally in assembler).
instructional comment: one way of avoiding goto is to create a while loop and, should you want to skip something, use the next statement within the loop.
|
|---|