Re: Reading X lines at a time
Jose Alves de Castro <[email protected]>
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
I was thinking about something I could use "HERE":
while (HERE) {
# do something with $_
}
So it would take a little twist, probably...
What about when you have $X - 1 lines to read? It works, right?
On Mon, 2004-05-03 at 11:39, Dave Mitchell wrote:
> On Mon, May 03, 2004 at 12:19:55PM +0200, Sven Neuhaus wrote:
> > How about
> > push @lines, scalar <FILEHANDLE>, 1..$X;
>
> I presume you meant
>
> push @lines, scalar <FILEHANDLE> for 1..$X;
>
> > Technically however, you are still reading one byte at a time...
>
> No you're not!
--
José Alves de Castro <[email protected]>
Telbit - Tecnologias de Informação