@a = (12, 18, 56, 76, 99); $in = ; for(0..$#a){ die "found at $_\n" if $in == $a[$_]; } print "not found\n";