[Cialug] Perl - find blank/white line

Claus cialug@cialug.org
Tue, 12 Apr 2005 09:55:05 -0500


Hello Perl gurus

I'm having a program that reads lines and I want to find the first line 
without a printable character and I am having problems creating the 
correct condition.  So far I have:

   if ($line le " ")

But that treats a line starting with a tab as a blank line (aka the if 
is true) but unless the tab is not followed by a printable character I 
would like to tread it as a blank line.

If it helps, the lowest ord. of a printable character is 33 (!).

String functions prefered but regex is also accepted if need be.  Any 
help is appreciated.
   Claus