in reply to backwards if and while looping
is more clearly interpreted by perl to be while ($a < $b) if not $error{ $a++; }. Perl thinks $error{ $a++ } is a hash reference to %error. A construct that would DWYM would be (parenthesis not strictly necessary)while ($a < $b) if not $error { $a++; }
(!$error) && ($a++ while ($a < $b))
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: backwards if and while looping
by jcpunk (Friar) on Oct 01, 2004 at 20:20 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2004 at 22:44 UTC |