Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Reading double lines at a time

by Eureka_sg (Monk)
on May 07, 2001 at 11:39 UTC ( [id://78445]=note: print w/replies, xml ) Need Help??


in reply to Reading double lines at a time

Not to my knowledge

 $/ = undef ==> Read in entire file
 $/ = '' ==> Read by paragraphs
 $/ = 'c' ==> Read until 'c' is encountered

However, you can do something like this:

while(<FILE>){ $_ .= defined(my $temp = <FILE>)?$temp:''; #do whatever you want with $_ }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-20 16:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found