in reply to Advice on goto usage?
You should note, however, that gotos are considered bad practice, and quite rightly so in my opinion. Programs can be hard enough to follow when they flow logically, but with goto’s you can arbitrarily jump between any part of your program, quickly making a spaghetti nightmare, don’t be tempted unless your program is shorter than my example here.my $count = 0; LOOP: print "help\n"; $count++; die if $count > 10; goto LOOP;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Advice on goto usage?
by reasonablekeith (Deacon) on May 05, 2005 at 09:15 UTC |