> 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 >
Do you mean something like? foreach my $piece (split /\|/, $line) { if ($piece eq '') { print ERRORLOG "Empty value"; } } (Assumes split on '|' but doesn't have to) Obviously this is not terribly useful as it doesn't tell you what was empty, but there are lots of ways around that, obviously you will need to know the column headings. Does this help? If not you might provide more information specifically about what you are up to. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>