Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^6: Pattern matching

by AnomalousMonk (Bishop)
on Nov 11, 2018 at 21:28 UTC ( #1225594=note: print w/replies, xml ) Need Help??


in reply to Re^5: Pattern matching
in thread Pattern matching

Most probably due to passing the regex as string instead of using qr.

Most certainly due to this. If warnings had been enabled, some Unrecognized escape \s passed through ... messages would have been seen. (And \b is a backspace IIRC.) The problem could also have been avoided by defining the regex as a single-quoted string, but I would not recommend this because I seem to remember that using single-quoted strings in this way still has some corner-case pitfalls. I agree: use of  qr// is best here.


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2020-11-25 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?