print grep { $_ eq $var } qw( 1 2 3 4 5 ) ? "Found.\n" : "Not found.\n";