in reply to Re^11: how to read input from a file, one section at a time?
in thread how to read input from a file, one section at a time?

And how do I print the duplicate entries?
  • Comment on Re^12: how to read input from a file, one section at a time?

Replies are listed 'Best First'.
Re^13: how to read input from a file, one section at a time?
by poj (Abbot) on Apr 02, 2019 at 16:18 UTC
    #next FASTA_RECORD if $fasta_seen{ $para }++; if ( $fasta_seen{ $para }++ ){ print "DUPLICATE : $name \n $para\n"; next FASTA_RECORD; }
    poj
      Hi Poj,
      Can I get your email ID if that's okay with you? I can send you the complete script and you can help me with my struggle.
        I posted the test file and the script in the scratchpad. Again thanks for everything Poj. I really appreciate your effort.
      Hi Poj,
      When I made the modifications that you suggested, for some reason, it mucked up the entire script. It started giving me errors like:
      Use of uninitialized value $lowest in printf at poj_repeat.pl line 60, <$PROTFILE> chunk 2.
      Use of uninitialized value $lowest in numeric eq (==) at poj_repeat.pl line 61, <$PROTFILE> chunk 2.
      Use of uninitialized value in numeric eq (==) at poj_repeat.pl line 61, <$PROTFILE> chunk 2.
      Can you help me with this? Use of uninitialized value in concatenation (.) or string at poj_repeat.pl line 62, <$PROTFILE> chunk 2.
      Missing argument in printf at poj_repeat.pl line 67, <$PROTFILE> chunk 2.
      Missing argument in printf at poj_repeat.pl line 67, <$PROTFILE> chunk 2

        Did you remove or comment out the original line ?

        #next FASTA_RECORD if $fasta_seen{ $para }++;
        poj
        Hi,
        Yes, I did. I actually forgot to put a semicolon. Lol. Nevermind.