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.
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
http://japhy.perlmonk.org/ % have long ago been overpaid?
http://www.perlmonks.org/ % -- Meister Eckhart
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>