#! /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"; }