Jeff 'japhy' Pinyan wrote:
On Aug 10, Tim McGeary said:


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"?


Assuming you store the data in an array, you can simply say:

  if (grep length == 0, @data_members) {
    print LOG "error: empty fields found in this dataset\n";
  }

Something to that effect should work.


Yes, they are indeed in an array. Excellent. I'll try this out. Thank you.


Tim


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to