Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How do I test for a blank line when reading from a file?

by runrig (Abbot)
on Oct 11, 2000 at 20:52 UTC ( [id://36247]=note: print w/replies, xml ) Need Help??


in reply to How do I test for a blank line when reading from a file?

If by "blank" you mean "empty", then /^$/, as in:
while (<>) { print "blank line detected\n" if /^$/; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-16 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found