And last time you showed me some code;-)
Are you just interested in counting the number of times that TWO occurs in each hour? Just an outline.
my %stats; while ( my $line = <$file> ) { next unless $line =~ /TWO/; my ($time) = $line =~ /^(\d\d\d\d-\w\w\w-\d\d \d\d)/)/; ++$stats{$time}; }
Update: Put $time in () and changed ++$stats{$date} to ++$stats{$time}. Thanks to CountZero for pointing out the error.
In reply to Re: comb a logfile for time diff and occourance
by hipowls
in thread comb a logfile for time diff and occourance
by tuakilan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |