in reply to Re: How can I use a text file as a search string?
in thread How can I use a text file as a search string?

This is what ihave so far. the part that is asking to look for perl. I want to change it to where it looks in a list like a txt or dat file.
open FILE, "/home/btobin/data.txt" || die "Unable to Open: $!"; while (<FILE>) { if ($_ =~ "Perl") { $check = "$_"; } } close FILE; open FILE2, ">>/home/btobin/data2.txt" || die "Unable to Open: $!"; print FILE2 "$check\n"; close FILE2;