Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: commenting regular expressions?

by ajdelore (Pilgrim)
on Sep 04, 2003 at 17:58 UTC ( [id://288950]=note: print w/replies, xml ) Need Help??


in reply to commenting regular expressions?

You need to add the /x modifier to your regexes.

Updated: as pointed out by a couple of others, you need to add it to each qr{...}x statement, not to the s//.

$$contents =~ s/$pattern/++$k && $replacement/gex;

</ajdelore>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-23 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found