my $count = ($line =~ s/[#] .*? \n//xms); $total += $count;