= 2; } $str = "helLo"; $ch = "l"; $result = containsTwice($str, $ch); # have to convert booleans to true/false strings, otherwise 1 is output for true, and nothing # is output for false. blep. $result = $result ? "true" : "false"; print "$str contains {$ch} twice: $result\n"; $ch = "e"; $result = containsTwice($str, $ch); $result = $result ? "true" : "false"; print "$str contains {$ch} twice: $result\n"; ?>