Help for this page

Select Code to Download


  1. or download this
    my @allvalues;
    for my $i ( 0 .. $#AoH ) {
       push ( @allvalues, $AoH[$i]{ page } );
    }
    
  2. or download this
      my @allvalues = map $_->{page}, @AoH;
    
  3. or download this
      # count occurrences of each value
      my %count;
    ...
    
      # keep only those copies that aren't duplicated
      @AoH = grep $count{$_->{page}} == 1, @AoH;
    
  4. or download this
      # replace @AoH with
      @AoH =
    ...
          $count{$_->{page}} == 1,
            # of the current @AoH
            @AoH;