I have a matching part that gets about 9 identical listings from my file.
I only need to get the 3rd listing (just one result only). Please advise How I can do this.
I tried a for loop but its not working:
while (<TMPFILE>)
{
chomp;
if($_ =~ /matchingStuffHere/)
{
for(my i=0;i<9;i++)
{
print $_[2]; #just want the 3rd index
}
}
}