Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Reading files n lines a time

by choroba (Cardinal)
on Dec 06, 2012 at 14:17 UTC ( [id://1007583]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Reading files n lines a time
in thread Reading files n lines a time

Using
while(( my @lines = map $_ = <>, 1 .. 4 )[-1]) {
should stop if the last line is not read as well. (You might need to add defined.)
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found