@out = map{ $_ == $target and last } @in;