$stem = quotemeta $stem; if ($word =~ m/^$stem/) {blah;}