http://www.perlmonks.org?node_id=506610


in reply to removing duplicate entries from an array

Here's a way that doesn't involve dirtiness:
use List::MoreUtils qw/uniq/; my @foo = (1,1,1,2,3); my @uniques = uniq @foo;