Help for this page

Select Code to Download


  1. or download this
    my @array = (1 .. 1000);
    my @toremove = (7,1,6,5,3);
    ...
    for (sort { $b <=> $a } @toremove) {
        splice @array, $_, 1;
    }
    
  2. or download this
    # another way to to it:
    
    for (reverse sort @toremove) { ... }