in reply to Insert unique data into array
my @data; my %seen; for (@input) { next if $seen{$_}++; push @data,$_; } [download]
using grep, that would be:
my %seen; my @data = grep { ! $seen{$_}++ } @input; [download]