in reply to Getting rid of duplicates
my(@array,%hash); for (1,2,3,2){push @array,$_ unless $hash{$_}++}; print @array; # prints 123 (no duplicates) [download]