Christopher Spears [mailto:[EMAIL PROTECTED] wrote:
I have to write a script that processes text in a
file. The text includes lots of blank lines. How can
I tell Perl to skip the lines?
On Tue, 14 Dec 2004 11:22:54 +0530, Mallik [EMAIL PROTECTED] wrote:
next if ($line =~ /^\s*$/);
+1 -
next if ($line =~ /^\s+$/);
-Original Message-
From: Christopher Spears [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 11:14 AM
To: [EMAIL PROTECTED]
Subject: regexp for a blank line
I have to write a script that processes text in a
file. The text includes lots of blank
Christopher Spears wrote:
I have to write a script that processes text in a
file. The text includes lots of blank lines. How can
I tell Perl to skip the lines? I thought maybe
something like:
next if ($line =~ /\s+/);
However, what if the line simply happens to have more
than one
Its simple.
next if ($line =~ /^\s*$/);
Mallik.
-Original Message-
From: Christopher Spears [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 11:14 AM
To: [EMAIL PROTECTED]
Subject: regexp for a blank line
I have to write a script that processes text in a
file. The text