use IO::File; open my $fhi, '<', $fi or die "$!, Couldn't open file $fi"; my @lines = $fhi->getlines; for my $line ( @lines ) { # Select only those lines with a HTML cell bg color spec; if ( $line =~ /^\s*