in reply to Re^3: syntax error near print
in thread syntax error near print

Martoooo!!! My problems are not finished!!! :-( While the script was running I see this error: print() on unopened filehandle OUTFILE at blast.parsing.pl line 53, <GEN1> line 3985842. print() on unopened filehandle OUTFILE at blast.parsing.pl line 55, <GEN1> line 3985842. and I realized that in the output is loosed the "accession number" column... Is there a solution?

Replies are listed 'Best First'.
Re^5: syntax error near print
by marto (Cardinal) on Jul 24, 2012 at 14:22 UTC

    In a couple of places you have:

    print OUTFILE "\t" if ($count > 0);

    When you don't have a file handle called OUTFILE. Previously in your code you have:

    open (OUT, ">$outfile" ) or die "Cannot open $outfile :$!";

    And print quite happily to it later in the code. If you are happy for the output to go to the existing file change the two occurrences of OUTFILE to OUT.