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

Re: I THOUGHT I'd finally understood genex

by wjw (Priest)
on Jan 09, 2018 at 14:51 UTC ( [id://1206983]=note: print w/replies, xml ) Need Help??


in reply to I THOUGHT I'd finally understood regex

You may find this CPAN module helpful in that you don't have to re-invent.... (Unless you want to re-invent, which is a good way to learn)

Net::IP::Match::Regexp

...the majority is always wrong, and always the last to know about it...

A solution is nothing more than a clearly stated problem...

  • Comment on Re: I THOUGHT I'd finally understood genex

Replies are listed 'Best First'.
Re^2: I THOUGHT I'd finally understood genex
by JEDtoo (Novice) on Jan 09, 2018 at 15:16 UTC
    I THOUGHT I was doing something simple. I thought by using a string at the top for the expression I was making it easier to read. Sometimes I think too much.
    My thanks to everyone for the help!
      I thought by using a string at the top for the expression I was making it easier to read.

      Even without the confounding  m/ / pieces in the string, it's almost never a good idea to use either a single- or double-quoted string to define a regex if you can avoid it; many subtle pitfalls lurk there. Use the  qr// operator instead; see Regexp Quote-Like Operators in perlop.


      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://1206983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-18 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found