-----Original Message----- From: Tim McGeary [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:01 AM To: [EMAIL PROTECTED] Subject: checking all pieces of split data for NULL
I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say "If any of these are '' then write to error log"? Thanks, Tim "Assuming" the you wish to split on a comma then: print "Bad data <$data>\n" if $data =~ /,\s*,/ || $d =~ /,\s*$/; hope this gives you some ideas... jwm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>