For Quality purpouses, Thomas Browner 's mail on Thursday 29 January 2004 18:46 may have been monitored or recorded as:
> Does perl have a goto command. For example if you tell scrip to do > something and it returns a 1 then it should go to a block of code that > does something else. Not talking about style (but in the TIMTOWTDI spirit): from perldoc -f goto: goto LABEL goto EXPR goto &NAME The "goto-LABEL" form finds the statement labeled with LABEL and resumes execution there. It may not be used to go into any construct that requires initialization, such as a subroutine or a "fore- ach" loop. It also can't be used to go into a construct that is optimized away, or to get out of a block or subroutine given to "sort". It can be used to go almost anywhere else within the dynamic scope, including out of subroutines, but it's usu- ally 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). (The difference being that C does not offer named loops combined with loop control. Perl does, and this replaces most structured uses of "goto" in other lan- guages.) hth, wolf -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>