Tim McGeary wrote:
> 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"?

   die "One or more fields is zero length\n" if grep !length, @fields;

   die "One or more fields is all whitespace\n" if grep $_ !~ /\S/, @fields;

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