for my $i (reverse (0..$idx)) { if ($list[$i] eq 'Susanne') { splice (@list, $i, 1); } }