Unless statements allow you to say unless something is true do this.
For example:
$value=20; unless($divisor==0){ #so long as the $divisor isn't equal to 0 $value=$value/$divisor; #go ahead and divide $value by $divisor } else { $divisor=1; #otherwise set $divisor to 1 }If you've got that I suggest you take a look at while loops
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: unless statements
by htoug (Deacon) on Feb 08, 2005 at 11:09 UTC | |
by Anonymous Monk on Jul 01, 2005 at 16:15 UTC | |
what is benefit of unless ?
by Anonymous Monk on Feb 05, 2005 at 11:34 UTC | |
by holli (Abbot) on Feb 05, 2005 at 17:43 UTC | |
by Anonymous Monk on Feb 05, 2005 at 12:04 UTC | |
by Anonymous Monk on Feb 05, 2005 at 12:15 UTC | |
by merlyn (Sage) on Feb 05, 2005 at 13:04 UTC | |
| |
by prasadbabu (Prior) on Feb 05, 2005 at 12:12 UTC |
Back to
Tutorials