Nkuipers wrote at Wed, 18 Sep 2002 18:53:44 +0200:
>>e.g. I have a file with a header - and I only need the data from line
>>100 and forward where the single lines are put in to a array for further
>>"treatment".
>
> If you are SURE of consistent formedness in your input file (data will always
> be at lines 100+) you could use the $. var, which holds the current line
> number in a file:
>
> open FH, "< yourfile" or die $!;
> while (<FH>) {
> next until $. = 100;
^
That should be a == (or a >= to be more defensive) :-))
> push @somearray, $_;
> }
>
> for (@somearray) {
> do something...
> }
Greetings,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]