Page is a not externally linkable
- Code, Content, and Presentation
-- Perl Server Side CGI Scripting
---- Ignoring certain regex matches


lindajames - 6:09 pm on Jan 28, 2004 (gmt 0)


Hi,

I have the following code that checks to see if the word error (not case sensative) exists and if so it displays an error message if not then it continues with executing the rest of script

if ($response->is_success && $Content!~ /error/i) {
return $response->content;
}
else {
$Error_msg = $response->message;
return undef;
}
}

the problem is that on the page that it looks at there is always a fixed word there called "Error Pages" so i wanted the above code to do exactly what it does but ignore the exact word "Error Pages"

can anyone help me with this?

Cheers
Linda


Thread source:: http://www.webmasterworld.com/perl/3438.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com