foreach (@ARGV) { next if $y eq $_; # don't count any occurrences of # $y $Y{$y}++, }