Re: Reading X lines at a time

Peter Makholm <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
Sven Neuhaus <[email protected]> writes:

> How about
> push @lines, scalar <FILEHANDLE>, 1..$X;

If you want something that returns X lines in a way like <FH> does,
then you could use a hack like:

    @lines = map scalar<FH>,1..$X

-- 
 Peter Makholm     |              I have no caps-lock but I must scream...
 [email protected] |                                               -- Greg
 http://hacking.dk |
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.