in reply to Not sure how it's working?

Are you saying that given the line
>hsa-let-7a-5pTGAGGTAGTAGGTTGTATAGTT
the Perl code you've shown splits it into two lines?
hsa-let-7a-5p TGAGGTAGTAGGTTGTATAGTT
Well you "can't get your head around how it's actually doing it" because it doesn't. But shouldn't fasta files have headers on separate lines? That is, aren't header and body different lines to begin with?
>hsa-let-7a-5p TGAGGTAGTAGGTTGTATAGTT