Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: writing perl function like sql IN

by DamnDirtyApe (Curate)
on Aug 30, 2004 at 22:50 UTC ( [id://387058]=note: print w/replies, xml ) Need Help??


in reply to writing perl function like sql IN

Set::Scalar does this nicely.

#! /usr/bin/perl use strict; use Set::Scalar; my $x = 3; my $s = Set::Scalar->new( 1, 3, 7 ); if ( $s->has( $x ) ) { print "Found $x\n"; }

_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Log In?
Username:
Password:

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

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

    No recent polls found