open my $file, '<', "myfilename"; while (<$file>){ next unless /mystring/; print "string found at line $."; } close $file;
In reply to Re: Returning line numbers of a string
by pvaldes
in thread Returning line numbers of a string
by pts491
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |