in reply to Re: missing character when reading input file
in thread missing character when reading input file

As an example:

Input of first line: acggaccgcggcatttgccaatttgcgcgtcgtcgggggtcgccatgatgtttcgcttggcaggcttttttgctttggcactgctggtcgcgggaaagcc

Output of first line: ACGGACCGCGGCATTTGCCAATTTGCGCGTCGTCGGGGGTCGCCATGATGTTTCGCTTGGCAGGCTTTTTTGCTTTGGCA

So the sequence: ctgctggtcgcgggaaagcc is completely gone from my output. Interestingly, the output is 80 chars while the input is 100, so the missing chunk is exactly 20. Is Perl somehow limited to only 80 chars in a line of text?
  • Comment on Re^2: missing character when reading input file

Replies are listed 'Best First'.
Re^3: missing character when reading input file
by AnomalousMonk (Archbishop) on Sep 11, 2018 at 16:10 UTC

    Still not a lot of info to do | go on, but let me suggest you have "invisible" characters lurking in your input:

    c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my $seq = qq{what is wrong with this\x0dline}; print $seq; dd $seq; " line is wrong with this "what is wrong with this\rline"
    Some kind of data dump (Data::Dumper, Data::Dump) might be informative. (Data::Dumper is core and so should already be installed.)


    Give a man a fish:  <%-{-{-{-<

      For this to work with Data::Dumper you need to set $Data::Dumper::Useqq = 1; Otherwise the \r isn't replaced by visible chars.

      perl -MData::Dumper -E "print Dumper qq<a\rb>" b';R1 = 'a
      perl -MData::Dumper -E "$Data::Dumper::Useqq = 1; print Dumper qq<a\rb +>" $VAR1 = "a\rb";
      One of the main reasons to prefer Data::Dump over Data::Dumper for debugging :)

      80 chars really sounds like a display limit though, rather than an invisible char

Re^3: missing character when reading input file
by Eily (Monsignor) on Sep 11, 2018 at 15:59 UTC

    Perl has no such limitations, so it comes from the way you display your output. I'm guessing this is on a terminal? If so, try forwarding it to a file instead

Re^3: missing character when reading input file
by AnomalousMonk (Archbishop) on Sep 11, 2018 at 19:28 UTC

    Further to Eily's post:

    80 chars really sounds like a display limit ...

    JediGorf:   Is the truncation always at 80 characters?


    Give a man a fish:  <%-{-{-{-<