my @array = (1,1,3,2,3,5,3,3,7,5,2); my (%ar_hash, @ar); for(@array) { next if($ar_hash{$_}++); push(@ar, $_); } print "@ar"; o/p : 1 3 2 5 7