- or download this
my $regex = join '|', @all_the_different_values;
if ( $data =~ /$regex/ ) . . .
- or download this
if ( $data =~ /^($regex)$/ ) . . .
- or download this
my %set;
@set{ @all_the_different_values } = (); # make the set
if ( exists $set{ $data } ) . . .