Hrm, looking at your post history it would seem all your questions so far are somehow related to lines like these. Are you making progress I hope? The following code demonstrates the basic ideas you'll probably employ, but you'll need to make a few changes too I think.
my %range_counts = (); my %counts = (); while( $entire_file =~ m/(\d+)bn(\d+), bytes/sg ) { $range_counts{'4kset'} ++ if $2 > 4000 and $2 < 6000; $counts{$2} ++ if $2 > 4000 and $2 < 6000; } print "there were $counts{'4kset'} 4000-6000 lines\n";
I suspect you'd also benifit from pouring the results into a database of some kind. Then you could run queries like SELECT sum(something_column), avg(something_column) FROM data WHERE something>something and something < something and report on all kinds of interesting details.
-Paul
In reply to Re: Parsing a Flat File and counting occurances of numbers?
by jettero
in thread Parsing a Flat File and counting occurances of numbers?
by batcater98
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |