Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Nifty qr OR bullets with butterfly wings

by ikegami (Pope)
on Aug 14, 2009 at 02:59 UTC ( #788498=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Nifty qr OR bullets with butterfly wings
in thread un-Nifty qr OR ASCII bullet parser

It returns the string (?-xism:[@*+])

  1. qr/[%s]/ builds a regex that matches strings containing "%" or "s".
  2. sprintf stringifies the compiled regex to (?-xism:[%s]) to use it as the format pattern.
  3. The characters are included into the format pattern and the result is returned by sprintf.

So not only do you not end up with a compiled pattern, you waste time compiling a pattern you never use!


Comment on Re^3: Nifty qr OR bullets with butterfly wings
Select or Download Code
Re^4: Nifty qr OR bullets with butterfly wings
by belg4mit (Prior) on Aug 14, 2009 at 03:37 UTC
    Doh! damn, that sucks.... back to $bullet = qr/[\Q@{[join '', keys %bullets]}\E]/; I guess.

    --
    In Bob We Trust, All Others Bring Data.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-04-18 01:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls