for (my $i = $#array; $i > -1; $i--) { # Delete element here if it matches. splice @array, $i, 1; }