Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Using variable in regular expression

by atcroft (Abbot)
on Aug 08, 2019 at 04:05 UTC ( [id://11104133]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Command-line version of OP code 
    #   (and added line showing value of $regexp):
    ...
    print qq"regexp: $regexp";'
    NO MATCH
    regexp: qr/def/m
    
  2. or download this
    # Command-line version of OP code 
    #   (and added line showing value of $regexp), with $regexp corrected:
    ...
    print qq"regexp: $regexp";'
    MATCHED
    regexp: (?^m:def)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-16 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found