in reply to Re: strip perl comment lines
in thread strip perl comment lines

Thanks for the lesson repson. I see the wisdom of your changes:

But the final print statement:

print ($good_lines+$bad_lines) . "lines read from $infile\n", "$bad_lines comment lines detected in $infile\n", "$good_lines lines written to $outfile\n";
Failed on 5.00503 with the warning:
print (...) interpreted as function at unc_rep.pl line 40.
So /me sweeps up around the monastery:
my$lines=($good_lines+$bad_lines); print "$lines lines read from $infile\n", "$bad_lines comment lines detected in $infile\n", "$good_lines lines written to $outfile\n";
ps - fixed omission of the 2nd $0 in the original.