|Syntactic Confectionery Delight|
Re: Dynamic if loopby CountZero (Bishop)
|on Mar 25, 2010 at 07:23 UTC||Need Help??|
What have you tried?
What do you mean by an if-loop?
Perl has for or foreach-loops, while and until loops. They can be further modified with next, last, redo and continue operators.
There are a number of hidden loop constructs such as map and grep.
Finally you can "roll your own" with labels, if ... then ... else and goto
Plenty of choice: it is the embarrassment of riches.
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James