Hi Parys,

Your statement "$joinedDNA =~ s/\R//g;" will remove new line in the string.
You may remove this statement.

thanks,
Kimi


On 14 February 2014 15:48, Parysatis Sachs <parysatissa...@gmail.com> wrote:

> Hi everyone!
>
> I'm new to this mailing list as well as to programming and Perl in
> general. So there is a chance I might ask relatively stupid questions with
> very obvious answers... Please bear with me!
>
> So, here it goes:
>
> I have a very long string with lots of Ns in it, like this:
> attttgctagccgagctaNNNNNNatggctaNNNNNNNatgcccctgaNNNNNNatg
>
> So, I want to get rid of the Ns and get ONE SINGLE newline for each group
> of Ns
>
> So far I've managed to do this:
>
> if ($joinedDNA =~ s/N+/\n/g) {
>
> $joinedDNA =~ s/\R//g;
>
> }
>
> But now I have everything joined together and can't tell where the Ns were
> before. I want output like so:
>
> attttgctagccgagcta
>
> atggcta
>
> atgcccctga
>
> atg
>
> Thanks for your help everybody, I really appreciate it!
>
> Parys
>

Reply via email to