Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: File length ??

by thor (Priest)
on Sep 13, 2002 at 00:06 UTC ( #197401=note: print w/replies, xml ) Need Help??


in reply to File length ??

perl does a wonderful job of pattern matching. Here's what I've got:
while(<DATA>){ # Populate the data array if ($_ !~ /^\s*$/){ push @data, $_; } }
This gets rid of lines that have only whitespace. If you want truly blank lines take the \s* out of the regex.

thor

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://197401]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2022-08-15 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?