|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Answer: how can i search a text file for a string and print every occurence of that string |
| ( #98391=categorized answer: print w/ replies, xml ) | Need Help?? |
|
Q&A > strings > how can i search a text file for a string and print every occurence of that string contributed by Hofmator
I normally wouldn't program that by hand. Depending on your operating system I would use a grep variant (on *nix) or find/findstr (on Win). Alternatively you can use the equivalent from the Perl Power Tools . --Hofmator
|
|
||||||||||||||||||