in reply to Unique elements in an array
@list =(1,2,2,3,4,4,5); map{$hs{$_}++} @list; print keys %hs; [download]