in reply to for loop to get the 3rd index
thats my solution .. hope it helps..my $match_count = 0; my $third_match; while (<TMPFILE>) { chomp; if($_ =~ m/matchingStuffHere/) { $match_count++; if($match_count eq 3) { $third_match = $1; } last; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: for loop to get the 3rd index
by cbro (Pilgrim) on Jun 06, 2003 at 14:02 UTC | |
|
Re: Re: for loop to get the 3rd index
by Grygonos (Chaplain) on Jun 06, 2003 at 13:50 UTC |