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 whitespace. Even a sentence has whitespace
between the words! Or maybe the line is idented!

"I'm the last person to pretend that I'm a radio. I'd rather go out and be a color television set."
-David Bowie

"Who dares wins"
-British military motto

"The freak is the norm." - "The Infernal Desire Machines of Dr. Hoffman" by Angela Carter

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
groupbeginners @
postedDec 14, '04 at 5:44a
activeDec 14, '04 at 4:47p



site design / logo © 2022 Grokbase