Re: better way to skip first few lines of file read?
- From: rvtol+news@xxxxxxxxxxxx (Dr.Ruud)
- Date: Fri, 29 Dec 2006 00:19:31 +0100
Alan Campbell schreef:
[attribution repaired] Ricardo:
[attribution repaired] Ruud:
[quote characters fixed]
<TRACECSV> while $. <= 4;
$. is not well-known to many Perl programmers.
I don't think you are right. And it was used in the original posting.
<TRACECSV> for 1 .. 4;
thanks. Above solution is simple & effective. I agree that I was
gratuitously using $. when your solution is far easier to document
and probably safer in my program since I have several filehandles
open.
The "for 1 .. $n" is OK, unless a very large $n would mean that precious
memory is wasted.
--
Affijn, Ruud
"Gewoon is een tijger."
.
- Follow-Ups:
- Re: better way to skip first few lines of file read?
- From: Uri Guttman
- Re: better way to skip first few lines of file read?
- References:
- Re: better way to skip first few lines of file read?
- From: Alan Campbell
- Re: better way to skip first few lines of file read?
- Prev by Date: Re: perl extracting substrings from string
- Next by Date: Re: perl extracting substrings from string
- Previous by thread: Re: better way to skip first few lines of file read?
- Next by thread: Re: better way to skip first few lines of file read?
- Index(es):