in reply to backwards if and while looping
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++; } }
|
|---|