in reply to search match within flat text file
Works for me$vchpage = `cat $tmp`; if ($vchpage =~ /File Error/gi){
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 :)
| These are not the monks you are looking for, move along |
|
|---|