my %idx; open FH, "logfile" or die "can't open logfile"; while (<FH>) { my ($ser,$msg) = $_ =~ /^(.+?-.+?)\s+(\S+)/; $idx{$ser}->{$msg}++; if ($idx{$ser}->{begin} && $idx{$ser}->{doing-work} && $idx{$ser}->{complete} ) { # found all the stuff, remove the entry. delete $idx{$ser}; } } print "didn't complete:\n"; foreach my $ser (keys %idx) { print "\t$ser\n"; }
In reply to Re: Efficiently parsing a large file
by Anonymous Monk
in thread Efficiently parsing a large file
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |