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