my $pos; for (0..$#array) { $pos=$_ and last if $array[$_] eq $wanted; } @array=@array[0..$pos-1, $pos+1..$#array, $pos];