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."