Putting it on one line will illuminate the problem. while ($a < $b) if not $error{$a++}; It thinks error is a hash since immediately following it (and owe to perls ignoring whitespaces) is a opening curly a var and a closing curly.. effectively referencing the $a+1 key of the hash %error.
personally I don't see a better way than
if(!$error) { while($a < $b) { $a++; } }
In reply to Re: backwards if and while looping
by Grygonos
in thread backwards if and while looping
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |