my @aa = ("Phe","Val","Asn","Gln","His","Leu","Cys","Gly","Ser"); my $s = ""; foreach my $i (@aa) { $s .= "--" if $s; $s .= $i; } print $s;