RE: pattern matching binary or garbage characters in string

2004-07-01 Thread christopher . l . hood
Thanks to all that helped with this problem, and thanks especially to RandyS as he hit the nail on the head. Here is the final working code block below. while () { chop $_ ; if( (/JUNIPER/) || (/REDBACK/) ){ print DSL $_ . "\n"; } else {

Re: pattern matching binary or garbage characters in string

2004-06-30 Thread John W . Krahn
On Wednesday 30 June 2004 15:07, Randy W. Sims wrote: > > try either: > > /[:print:]/ && print "junk"; So you are saying that the characters ':', 'p', 'r', 'i', 'n' and 't' are junk? You probably meant to use the character class [^[:print:]] or [[:^print:]] instead. :-) John -- use Perl; p

Re: pattern matching binary or garbage characters in string

2004-06-30 Thread Randy W. Sims
On 6/30/2004 5:20 PM, [EMAIL PROTECTED] wrote: 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 l

Re: pattern matching binary or garbage characters in string

2004-06-30 Thread Gunnar Hjalmarsson
Christopher L Hood wrote: 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

pattern matching binary or garbage characters in string

2004-06-30 Thread christopher . l . hood
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 fil