Re: goto command

2004-01-29 Thread wolf blaum
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

Re: goto command

2004-01-29 Thread Rob Dixon
Thomas Browner wrote: > > 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. Yes. But I've never seen a case where I think it should be used. Perl isn't a scripting language. (Although

RE: goto command

2004-01-29 Thread Paul Kraus
Sub dothissubroutine { Do something If return this Else return this } My $result = &dothissubroutine If $result = this }elsif This }else{ This } Paul Kraus --- PEL Supply Company Network Administrator > -Original Message

RE: goto command

2004-01-29 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Why not just make it a sub, so you perform the sub and continue on from there: if ( sub1() ) { # return of true sub2(); }else { # return false, so do something else or nothing } Wags ;) -Original Message- From: Thomas Bro

Re: goto command

2004-01-30 Thread Noah Ganter
The reason why the goto command is not generally used in perl (and other languages) is that it does not force the developer to have a theoretical framework for the program. It creates 'spagetti code' where a person working on the code or trying to understand what the developer has done has to follo