Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Reading files n lines a time

by choroba (Abbot)
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.)
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^3: Reading files n lines a time
Download Code

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 chanting in the Monastery: (6)
As of 2014-12-20 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (97 votes), past polls