That sounds like a good approach. After opening the file, you need to read its contents into a variable before you can check if your search string appears in there.
perlintro should teach you enough Perl to get started, and has similar enough examples to what you want to do. If you have trouble with a specific step, feel free to ask (and include the code you have written, and the problem you are facing).
In reply to Re: how to search for a string in a particular file?
by moritz
in thread how to search for a string in a particular file?
by tm86
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |