in reply to syntax error near print

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

Is missing a semi colon:

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

Replies are listed 'Best First'.
Re^2: syntax error near print
by mariannapac (Initiate) on Jul 24, 2012 at 10:49 UTC

    I added semicolon at prevoius line as you suggested but now there is a new error message: Parsing BLAST results Cannot open 429F04: Permesso negato at blast.parsing.pl line 24. 429F04 is the output name, just as example... thanks again for your suggestion

      I guess this is a 'permission denied' message, in Italian. Ensure that the value you have for $outfile is what you think it should be and that you can create this file manually. If you have permissions issues check with your sysadmin, perhaps you don't have access to write files to the directory in question.

        I created the outfile with sudo command. So I'm sure the 429F04 file is present in /usr/bin....

        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?