use List::MoreUtils qw(uniq); use strict; my @array=; my @array=uniq(@array); print "\n@array"; __DATA__ at12 at12 at12 at13 bn23 bn23