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; } }
In reply to Re: for loop to get the 3rd index
by Grygonos
in thread for loop to get the 3rd index
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |