Update: The following is wrong. Ignore it.
foreach (@ARGV) { $Y{$y}++,next if $y eq $_; }
$Y{$y} += grep $y eq $_, @ARGV;
This can replace the whole if/else.$Y{$y} += (grep $y eq $_, @ARGV) || 1;
It's unclear what happens in the ellipses. Note that if 0 is in @ARGV, it won't be counted in %Y because of next unless $y.
In reply to Re: Code review
by choroba
in thread Code review
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |