Rob Dixon wrote: > IMO that's a bit strong. 'goto' will always have its place until
> language authors can predict all possible flows of control that > could be wanted by a programmer. Perl is richer than most in that > it has implicit gotos last, next, redo, return and die, but it > still has no try .. catch and many other things that I can't think > of now. I don't know, Rob. I would be interested in hearing of any real-world problem that would demand this. Of course, absolutes are always inappropriate, so we should never use them in polite speech, but the last time I can remember using the command, I was entering it with a single-key command, a special feature of the revolutionary Timex/Sinclair 1000. > In the words of perldoc -f goto: > > It can be used to go almost anywhere else within the dynamic scope, including > out of subroutines, but it's usually better to use some other construct such as > "last" or "die". The author of Perl has never felt the need to use this form of > "goto" (in Perl, that is--C is another matter). > > 'Usually better' is different from 'deprecated' (and there are a > lot of deprecated constructs in Perl!) > > Rob You know, I( remember reading the passage above--and raising an eyebrow on the comment regarding C. Like, "C has a goto?". It is the last place I would look for such a construct. BTW, my comment about theconstruct being dedicated didn't refer so much to Perl specifically as to modern programming in general. As it turns out, Kernighan and Ritchie were more liberal on the subject than I remembered, allowing as to how it might help in making an immediate break out of a deeply nested loop, but also pointing out that: "Code involving a goto can always be written wothout one, though perhaps at the price of some repeated tests or an extra variable." [Kernighan and Ritchie, "The C Programming Language", 2nd Edition, 1988, Sec.3.8] Reading this Bible passage, I found it remarkably similar to the discussion of the construct in the Perl docs. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>