One way is to do this...
while ( my $line = <FILE> ) {
next if ( /^\s*$/ );
}
Rob
-----Original Message-----
From: Booher Timothy B 1stLt AFRL/MNAC
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 5:19 PM
To: [EMAIL PROTECTED]
Subject: find blank line
When parsing a text file - what is the best way to skip a "blank" line -
when I find the length I get a length of 1 (perhaps the newline). I know
that I could chomp($_) and then if(length($_) != 0) {do something} else
{next} but I feel that there should be a way to have an if($_ = $blank)
statement.
Any thoughts . . .
tim
____________________________________________________
Timothy B Booher, Lt USAF, AFRL/MNAC
101 West Eglin Blvd, Suite 339
Eglin AFB FL 32542-6810
Phone: 850-882-8302 Ext. 3360 (DSN 872-)
FAX: 850-882-2201
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]