in reply to Re^2: Duplicated data in array.
in thread Duplicated data in array.

Untested:

my %seen1; my @out1 = grep { ! $seen1{ $_->{ID} }++ } @in; my $arrayref = \@out1; pp $arrayref;

Update: Perhaps a bit late for this afterthought, but the general form of this question is "How do I create a reference to X?" Please see perlref and perlreftut. See also Perl Data Structures Cookbook (perldsc) for dealing with complicated referential structures.


Give a man a fish:  <%-{-{-{-<