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

Re: Curious find while comparing grep, map, and smart match... (substring)

by tye (Sage)
on Mar 27, 2013 at 01:00 UTC ( [id://1025609]=note: print w/replies, xml ) Need Help??


in reply to Curious find while comparing grep, map, and smart match...

3145 =~ /14/ but not 14 ~~ 3145.

- tye        

Replies are listed 'Best First'.
Re^2: Curious find while comparing grep, map, and smart match... (substring)
by dbuckhal (Chaplain) on Mar 27, 2013 at 01:54 UTC

    That makes sense, hence many single digit values are rarely present.

    Good candidate for a "golf"-ish answer!

    UPDATE: adding word boundaries helped, now the arrays generated are equal.

    map { /\b$rInt\b/ } @mArray

    Thanks!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found