http://www.perlmonks.org?node_id=1007562


in reply to Reading files n lines a time

wont work anymore
What 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"; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ