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 ( #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
Node Status?
node history
Node Type: note [id://1206983]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2018-07-23 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (469 votes). Check out past polls.

    Notices?