Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Count ID values

by ungalnanban (Pilgrim)
on Mar 20, 2010 at 06:54 UTC ( #829772=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Count ID values
in thread Count ID values

See the following Code:
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" }
--$ugum@r--


Comment on Re^3: Count ID values
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://829772]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-09-20 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls