Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regex variables with delimiters

by AnomalousMonk (Archbishop)
on May 18, 2019 at 01:08 UTC ( [id://11100213]=note: print w/replies, xml ) Need Help??


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:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11100213]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found