What are you trying to match, and what is your script showing?
I see a couple issues to note..
print '\nA match was found\n';
should be
print "\nA match was found\n";
also, the code $text = <search>; only reads the first line of the file.
If you want to look for a match on any line in the file, you have to put that in a loop to check each line.