Help for this page

Select Code to Download


  1. or download this
      # build a hash that contains only excluded IDs
      my %exclude = map { ( $_->{id} => 1 ) } @AoH_one;
    
      # now keep only those that are not excluded:
      my @keepers = grep { not $exclude{ $_->{id} } } @AoH_all;
    
  2. or download this
      @AoH_all = grep { not $exclude{ $_->{id} } } @AoH_all;
    
  3. or download this
      # use liz's technique
      foreach my $i ( reverse 0 .. $#AoH_all )
    ...
              # whoops, bug here, see update...
          }
      }
    
  4. or download this
      # adjust $i after replacement so it is reexamined:
      for ( my $i = 0; $i < @AoH_all; ++$i )
    ...
              ++$i;
          }
      }