Dear Monks, How to dynamically remove array elements? For example, I want to remove certain elements of @array whose indices are stored in @arrayindex. However, when I try to execute the code below, it does not work because in each loop the length of @array changes thus making the original index values (stored in @arrayindex) inappropriate. foreach my $i (@arrayindex) { splice(@array, $i, 1); } Any suggestions on how this should be done. Thanks Monks.