print( test_reg('fudge','fudge') ? "matches\n" : "no matches\n" ); sub test_reg { my $this = shift; my $that = shift; return $this =~ /$that/i; }