>Seq1 AGAGAGAGAGAGGA AGAGAGAGTTCCTT CATCGCACATCAGA AGG >Seq2 GCGTGAGATTGAGG GAATTGAGAGAGAG >Seq3 GAGAGCGCGACCCC TGAGTAGATAGAGA ACAGATATAGGAGA AGAG #### #Print the file print $_.$/ for (@fastafile); #Reverse the file @fastafile = reverse @fastafile; #Change the 2nd secuence $fastafile[1] = $other_seq; #Put more sequences push @fastafile, $other_seq; #### tie @fastafile,'Tie::File',recsep=>"\n>",autochomp=>1;