1 #!/usr/bin/perl -w 2 use strict; 3 my %dup; 4 while(<>){ 5 my @row=split(/\s+/,$_); 6 $dup{$row[3]}=$dup{$row[3]}+1; #if change to $dup{$row[3]}++, it will run smoothly no error report 7 } 8 9 foreach my $id (keys %dup){ 10 if ($dup{$id}>1) { 11 print "$id\t$dup{$id}\n"; 12 } 13 }