Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: how to use string RE (against $_ and capture)

by dave_the_m (Monsignor)
on Nov 08, 2016 at 08:54 UTC ( [id://1175522]=note: print w/replies, xml ) Need Help??


in reply to Re^4: how to use string RE (against $_ and capture)
in thread how to use string RE (against $_ and capture)

Thus my need to know if a key in the table is a literal or a regex so I can do the right test to see if the key matches
Since the regex will have been stringified if used as a hash key, The only way I can think of doing that (if you can't store extra info in the hash value to indicate this) is to see if the key string matches /^\(\?.*\)$/. This will of course fail if an exact string match looks like "(?....)"

Dave.

  • Comment on Re^5: how to use string RE (against $_ and capture)

Log In?
Username:
Password:

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

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

    No recent polls found