in reply to Reading files n lines a time
wont work anymoreWhat happens? What error message do you get?
I experimented with reading multiple lines through map, this works for me, but is a bit ugly. Maybe someone else knows a cleaner way?
while(( my @lines = map $_ = <>, 1 .. 4 )[0]) { print @lines; print "\n"; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Reading files n lines a time
by tobyink (Canon) on Dec 06, 2012 at 14:22 UTC | |
by mbethke (Hermit) on Dec 06, 2012 at 15:37 UTC | |
Re^2: Reading files n lines a time
by naturalsciences (Beadle) on Dec 06, 2012 at 13:29 UTC | |
by choroba (Cardinal) on Dec 06, 2012 at 14:17 UTC | |
by naturalsciences (Beadle) on Dec 06, 2012 at 14:12 UTC | |
Re^2: Reading files n lines a time
by DrWhy (Chaplain) on Dec 06, 2012 at 19:25 UTC | |
by choroba (Cardinal) on Dec 06, 2012 at 22:38 UTC |
In Section
Seekers of Perl Wisdom