标签:
open RH, $ARGV[0];
%dict = ();
while(<RH>){
chomp;
$ln = $_;
if($dict{$ln}){
$dict{$ln} ++;
}else{
$dict{$ln} = 1;
}
}
while(($k,$v) = each %dict){
print $k ."\t" . $v. "\n";
}
close RH;
标签:
原文地址:http://my.oschina.net/xiechaoyong/blog/362203