is the ereg quite old?
having never done any perl im not too sure.
for testing strpos, it returns either false or the position where it is, so should i test for:
$result = strpos("cat","the cat sat on the mat");
if ($result) {
echo "The cat indeed sat on the mat!<br>
It was also at position:".$result." of the phrase";
}