in reply to length of 1's

From your description, this should be close to what you want:

my $newseq = do { local $/; <INFILE> }; $newseq =~ tr/01//cd; $newseq =~ tr/0/a/; $newseq =~ s/(1+)/ chr length( $1 ) + ord 'a' /eg; print "$_\n" for $newseq =~ /.{0,80}/g