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
In reply to Re: length of 1's
by jwkrahn
in thread length of 1's
by coldy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |