open CONT, "zcat $filename|$what"
or die $!;
- while (<CONT>) {last if /^FILE/mo;}
- open CONT, "zcat $filename|$what" if eof(CONT);
+ while (<CONT>) { last if /^FILE/mo; }
+ if (eof(CONT)) { # no header found
+ close CONT; # explicit close to reset $.
+ open CONT, "zcat $filename|$what";
+ }
while (<CONT>) {
my $data = "";
my %data = ();
chomp;
- print "Doing line ".($./1000)."k (out of approx 1.5M)\n" if $. % 250000 == 0;
+ print "Doing line ".($./1000)."k (out of approx 2.0M)\n" if $. % 250000 == 0;
/^(.+?)\s+(\S+)$/o;
my ($file, $value) = ($1, $2);
$value =~ s#[^,/]+/##og;
my $lastpath = my $lastcasepath = my $lastfile = "";
my %matches = ();
while (<MERGED>) {
- print "Doing line ".($./1000000)."M (out of approx. 16M)\n"
+ print "Doing line ".($./1000000)."M (out of approx. 20M)\n"
if $. % 1000000 == 0;
chomp;
my @line = split /\0/o, $_;