Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Comparing against multiple values

by PrimeLord (Pilgrim)
on Mar 18, 2002 at 19:19 UTC ( [id://152563]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash = qw(
           $bar => 1
    ...
           $boo => 1
    );
    print "yep!\n" if exists $hash{$foo};
    
  2. or download this
    Regex Solution
    timethis 100000: 18 wallclock secs ( 0.41 usr +  0.05 sys =  0.45 CPU)
    
    Hash Solution
    timethis 100000:  1 wallclock secs ( 1.58 usr +  0.00 sys =  1.58 CPU)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found