in reply to Returning line numbers of a string
open my $file, '<', "myfilename";
next unless /mystring/;
print "string found at line $.";
Yes, I watch meteor showers
No, I do not watch meteor showers
My meteors prefer to bathe
Results (173 votes). Check out past polls.