Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: writing perl function like sql IN

by Arunbear (Prior)
on Aug 31, 2004 at 12:10 UTC ( [id://387169]=note: print w/replies, xml ) Need Help??


in reply to writing perl function like sql IN

use strict; sub in (@) { my $x = shift; $_ == $x and return 1 for @_; 0 } my $x = 10; if(in $x => 1 , 3, 7) { print "Found\n"; } else { print "Not found\n" }

Log In?
Username:
Password:

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

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

    No recent polls found