Let us know when you get stuck implementing this in Perl.open log-file set line-counter to 0 read the log-file a line at a time add one to the line-counter if the pattern is found, then then print "I found pattern at ", line-counter once the file is completely read, close log-file print "We Are Done!!" exit
----
I Go Back to Sleep, Now.
OGB
In reply to Re: Returning line numbers of a string
by Old_Gray_Bear
in thread Returning line numbers of a string
by pts491
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |