Hi, I'm having trouble searching for string in a webpage.
The string I'm searching for is a piece of perl code:
if($number2==0 && $operator eq "/")
The problem seems to be that the quotes in the string need to be formatted, so using the addslashes function the string to be searched becomes:
if($number2==0 && $operator eq \"/\")
However, this string cannot be found either. The webpage I am searching is being read into a variable using the following commands:
$fp_cal = fopen("submitted/cal_source.htm", "r");
$contents = fread($fp_cal, 10000);
I'm wondering if any formatting needs to be done to the $contents variable such as stripslashes? I have experimented with this thought but with no success. I know that the file is being read ok as other searches for simpler strings work.
Thanks in advance for any feedback.