in reply to Pop quiz: find the bug

He assures me that this is a documented feature.
Indeed it is, right at the top of perlref:
Note that taking a reference to an enumerated list is not the same as using square brackets--instead it's the same as creating a list of references!
@list = (\$a, \@b, \%c); @list = \($a, @b, %c); # same thing!
As a special case, \(@foo) returns a list of references to the contents of @foo, not a reference to @foo itself. Likewise for %foo.

Update
I realized I didn't answer the question....

I think:
B::Deparse to the rescue: your code compiles to:

SWITCH: { last SWITCH if $id == $CASH and $tcash += $amt; last SWITCH if $id == $ACCOUNT and $taccount += $amt; last SWITCH if $id == $CHECK and $tcheck += $amt; last SWITCH if $id == $GIFT and $tgift += $amt; last SWITCH if $id == $VOUCHER and $tvoucher += $amt; last SWITCH if $id == $CC_MAN_AUTH and $tcc_man_auth += $amt; $tcredit += $amt; }
So you're continuing to the next case if $amt and the value being increased are both zero. Though that shouldn't cause any harm....

Update 2
Ack, I think I got it! Thanks Aristotle!
$amt can be negative. It can still bring one of the others to zero, then get decremented from the following branch.

Replies are listed 'Best First'.
Re^2: Pop quiz: find the bug
by Aristotle (Chancellor) on Jul 03, 2002 at 23:37 UTC
    Hehe, oh yes it does cause harm - exactly that is the subtle bug Ovid was talking about.

    Makeshifts last the longest.