in reply to Skip chomp?
in thread Base sequence length in fasta format file

Actually if portability is a concern than the chomp is vital, but no matter what hes going to have to factor the length of the /n into his length calculation.

You are correct however in that he needs to put the newline back on once its been removed.

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.

Replies are listed 'Best First'.
NL len not an issue, at least for Win32
by RMGir (Prior) on Apr 25, 2002 at 15:15 UTC
    NL len isn't going to be an issue, as long as he doesn't binmode the filehandle.

    CRLF pairs will be translated to a single LF on input, and translated back going the other way.

    But if you prefer to chomp then add the newline, that works too :)
    --
    Mike

      Er. Well a couple of test prove you right.

      But also prove me right: (phew ;-)

      print length <DATA>,$\; print length <DATA>,$\; __DATA__ ABCDEF ABCDEF
      outputs:
      7 6
      So there still could be an issue here... :-)

      Although granted it isnt the one I was harping on about...

      Yves / DeMerphq
      ---
      Writing a good benchmark isnt as easy as it might look.