in reply to Re^3: concatenating multiple lines without using . operator
in thread concatenating multiple lines without using . operator

Thanks for the reply.I tried this but it is still printing in the same format. I am not sure where I am going wrong.

  • Comment on Re^4: concatenating multiple lines without using . operator

Replies are listed 'Best First'.
Re^5: concatenating multiple lines without using . operator
by NetWallah (Canon) on Jun 13, 2012 at 15:49 UTC
    So - you want to SLURP and CONCATNATE. Try replacing your entire WHILE loop with:
    do {local $/; ($seq{$chr}=<IN>)=~s/[\s\r\n\t]//g};

                 I hope life isn't a big joke, because I don't get it.
                       -SNL

      I think this might cause a problem since there will be occasional lines that look like >chr02 which are the sequence IDs and meant to be hash keys. Slurping like this would miss the transition between chromosomes or distinct DNA sequences.
        I acknowledge your point - I'm still not clear about what the OP's requirements are - I was merely trying to show how she/he could slurp and concatenate.

                     I hope life isn't a big joke, because I don't get it.
                           -SNL