|
$id == $FOO && ($tfoo += $amt) && last SWITCH; depends on the final value of $tfoo being non-zero. If zero, the switct falls through to the default and awards double credit :) To repair, have 'last' execute unconditionally with the comma operator: $id == $FOO && ($tfoo += $amt), last SWITCH; |
After Compline,
Zaxo
In reply to Re: Pop quiz: find the bug
by Zaxo
in thread Pop quiz: find the bug
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |