Perl-Sensitive Sunglasses | |
PerlMonks |
Re: backwards if and while loopingby periapt (Hermit) |
on Oct 01, 2004 at 19:55 UTC ( [id://395730]=note: print w/replies, xml ) | Need Help?? |
The line
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)
PJ use strict; use warnings; use diagnostics; (if needed)
In Section
Seekers of Perl Wisdom
|
|