perhaps: $word=<FILEHANDLE>; instead of the other way around. On Thursday, April 4, 2002, at 01:26 PM, Allison Ogle wrote:
> > I will actually be storing the filehandle as a variable and then comparing > it. Something like > > <FILEHANDLE>= $word; > chomp $word; > if ($word eq 'blank line') { > ... } > how would I use your suggestion in this case? > > if ($word=~ /^\s*$/) > > doesn't seem to work. > > -----Original Message----- > From: Nikola Janceski [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 04, 2002 3:53 PM > To: 'Timothy Johnson'; 'Michael Stearman'; [EMAIL PROTECTED] > Subject: RE: Filehandle = blank line??? > > > 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] > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >