Update: I'd downvote this if I could. My error was thinking $a and $b when
$_ was appropriate.
The recent thread, Better algorithm or data structure?, shows that this behavior of $_ is not well known. It surprised me. It took prompting for this aspect to register (thanks, BrowserUk).
Update: reduced code to the point. This expresses that to which I was referring. Map and grep, like for can, localize $_; this makes this post nonsensical;
## perl 5.10.1
my @ary = ( 0, 1, 2, 3);
grep $ary[$_ ], @ary; # no warning
grep $ary[$oo], @ary; # warns
Original verbose code: