How to search a file using perl?

tim85a

New member
I want to search a .txt file for "$data" and if its found call program2.pl and if not print $data. I know how to open and close the file, but can't search the file. I need to match the whole line not just if $data is in the start, middle or end.
Thanks for your help.
 
Back
Top