Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Check Array Elements

by morgon (Priest)
on Jun 06, 2012 at 22:41 UTC ( [id://974849]=note: print w/replies, xml ) Need Help??


in reply to Re: Check Array Elements
in thread Check Array Elements

This is wrong.

Counterexample:

@FILES = ("ABC", "ABC", "ABC");
Your grep would still report 3, event though "GHI" is missing.

And that is even without mentioning that the regex matches also enties like "XABCY".

Replies are listed 'Best First'.
Re^3: Check Array Elements
by NetWallah (Canon) on Jun 07, 2012 at 05:56 UTC
    Thanks for pointing out the bugs (++). Code updated above.

    I think that method is getting unwieldy. Much prefer ckjs approach below.

                 I hope life isn't a big joke, because I don't get it.
                       -SNL

      serious ++. I love seeing this type of accountability. I know I often have to swallow it.

Log In?
Username:
Password:

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

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

    No recent polls found