Is there a way to cause letters that begin quote-like operators such as m, s, qq, qr, and friends to be treated as barewords as opposed to the beginning of a quoted or regular expression string? If you look at the following nonsensical example:
$_ = '12';
s/(\d+)/($1 > 10)?m:n/e;
The intent is to replace the number in $_ with either 'm' or 'n', but Perl complains:
"Search pattern not terminated..."
because it thinks that 'm:' is the start of a regular expression match operator. Of course, I can quote the 'm' and everything works fine, but unfortunately this is for golf and I'd like to be able to leave off the quotes if possible to save characters. Is there a way to escape the 'm' or cause it not to be treated as an operator at a cost of fewer than the two characters it takes to quote it? Thanks for your thoughts!