my $regex = qr{(??{ join '|', map {quotemeta} qw/. | %/ })};