in reply to Regex variables with delimiters

$regexp = "m?" . <STDIN> . "?";

Also be aware that  m?pattern? or  ?pattern? is a special case of the match operator:

m?PATTERN?msixpodualgc
?PATTERN?msixpodualgc
This is just like the "m/PATTERN/" search, except that it
matches only once between calls to the reset() operator. ...
See  m?...? in Regexp Quote-Like Operators in perlop.

Update: See also  qr// in the above section of perlop for more info on interpolating strings into regexes. And see also perlre, perlretut, and perlrequick.


Give a man a fish:  <%-{-{-{-<