--$ugum@r--open(FH,"file"); foreach $line (<FH>) { if($line=~/^Db/) ### Get only the ID lines. { ($id,$count)=split(' ',$line); $count{$id}+=$count; } } print "ID\t\tCount\n"; foreach $key (keys%count) { print "$key\t$count{$key}\n" }
In reply to Re^3: Count ID values
by ungalnanban
in thread Count ID values
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |