I have a log file with thousands of lines, some of those lines come in with garbage / binary data in them. The lines with that happening are junk and of no use to me I want to pattern match for the junk and simply do nothing with that line, all other lines get divided into 2 different output files.
State your definition of garbage in a regex and make something like this the first line in the while loop:
next if /[^\w\s",.:@\/-]/;
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>