he might have chomp it... safer would be: if($_ =~ /^\s*$/){ } shorter would be: if(/^\s*$/){ }
> -----Original Message----- > From: Timothy Johnson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 04, 2002 3:42 PM > To: 'Michael Stearman'; [EMAIL PROTECTED] > Subject: RE: Filehandle = blank line??? > > > > Maybe if($_ =~ /^\s+$/){ > do something... > } > > -----Original Message----- > From: Michael Stearman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 04, 2002 12:46 PM > To: [EMAIL PROTECTED] > Subject: Filehandle = blank line??? > > > Hello all, > > I am stepping through an input file using the filehandle and > I need to do an > > if statement which recognizes whether the filehandle is a > blank line. In > other words, what I want to do is > > if ($_ eq 'blank line') { > ... } > > And I was wondering what I use to represent blank line. > Thanks for the > help...being so new to Perl this list has helped me a lot and > I am extremely > > grateful. Thanks again, > > Mike. > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------------- ---- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]