my @arr1 = (2, 34); my $val = 34; say "34" if $val ~~ @arr1; #34