Re: better way to skip first few lines of file read?



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

.