Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Reading files n lines a time

by choroba (Chancellor)
on Dec 06, 2012 at 14:17 UTC ( #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
Node Status?
node history
Node Type: note [id://1007583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2016-09-29 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (552 votes). Check out past polls.