Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: To Pattern Match or not to Pattern Match

by Zed_Lopez (Chaplain)
on Mar 04, 2005 at 00:15 UTC ( [id://436421]=note: print w/replies, xml ) Need Help??


in reply to To Pattern Match or not to Pattern Match

I'd make a hash out of @cdvw_list, and parse the id out of every name, and base my test on whether the id exists in the list:

my %cdwv_hash; @cdwv_hash{@cdwv_list} = (1) x @cdwv_list; for (@names) { my ($id, $name) = (m{^([^/]+)/([^|]+)|}); if (exists $cdwv_hash{$id}) { print "$id: $name\n"; } else { print "No match for $_ in cdwv_list\n" } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-20 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found