my $ok=0; map ($_ eq $test?($ok=1):0,@array); unless ($ok) {....