in reply to search match within flat text file

$vchpage = `cat $tmp`; if ($vchpage =~ /File Error/gi){
Works for me
Sounds like you have a problem with what you think you should be expecting.
Print out the contents of $vchpage. If it still looks right, then check for a non-printable char or extra spaces between 'File' and 'Error' in the output of $vchpage.

You should also look at changing your strategy, using 'cat' to run your file into a scalar is not very portable (M$ and Mac do not have 'cat'.), it also decreases your error reporting (what if you don't have permissions?), it also opens you up to strange errors (what if the new version of cat does something strange?)

look at opening the file and stuffing it into a scalar and searching with your regex, or reading the file into an array and greping it on your regex. These are safer solutions.

UPDATE: well Mac OS/X has 'cat' - still not used to a Mac with a real OS :)



grep
These are not the monks you are looking for, move along