# replace @AoH with @AoH = # only grep # the hashrefs whose 'page' value appears exactly once $count{$_->{page}} == 1, # of the current @AoH @AoH;