Re: Reading X lines at a time
Georg Moritz <[email protected]>
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
Hello Jose,
> @_=map{scalar(<>)}(1..$X)
inside a loop testing for eof is necessary:
while(!eof()&&(@_=map{scalar(<>)}(1..$X)){
&foo; # gets @_
}
greets,
georg
--
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s,/,($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e,e && print}