use List::MoreUtils qw(uniq); my @unique = uniq split(/\t/, $myLine); $myLine = join("\t",@unique);