Re: Reading X lines at a time

"A. Pagaltzis" <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <20040510000914.GA22079@klangraum>
* Rick Delaney <[email protected]> [2004-05-03 15:23]:
>     while (my @a = map { eof() ? () : scalar <> } 1 .. $n) {
>         print @a;
>         print "SEPARATOR\n";
>     }

     while (my @a = grep defined, map scalar <>, 1 .. $n) {
         print @a;
         print "SEPARATOR\n";
     }

-- 
Regards,
Aristotle
 
"If you can't laugh at yourself, you don't take life seriously enough."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.