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
|
---|
In Section
Seekers of Perl Wisdom