Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 examining the Monastery: (4)
As of 2014-09-23 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls