Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: writing perl function like sql IN

by DamnDirtyApe (Curate)
on Aug 30, 2004 at 22:50 UTC ( #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
Node Status?
node history
Node Type: note [id://387058]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2020-06-02 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (19 votes). Check out past polls.

    Notices?