in reply to searching a string

Because the string 'doghouse' is not found in the string 'dog', and because you aren't returning the strings, but rather printing them ...

(While I'm at it ... don't use $a and $b for other than sorting. They're "special".)

This would return "found":

$A = 'dog'; $B = 'doghouse'; if($B =~ /$A/){ return "found"; } else{ return "not found!"; }

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!