Re: prematurely closed filehandle
- From: "Jim" <jmoon@xxxxxxx>
- Date: 29 Jun 2006 09:14:00 -0700
Jim wrote:
Dr.Ruud wrote:
Jim schreef:
open RUNBLAST2, "| C:\\Inetpub\\wwwroot\\port\\blast\\blastall -e .01
-p blastp -d C:\\Inetpub\\wwwroot\\port\\blast\\db\\gbpoxpep -F F -m 7
-o C:\\Inetpub\\wwwroot\\webtemp\\152895786322021484375.xml ";
You should always check for the open to succeed.
#!perl
use strict ;
use warnings ;
use CGI qw(:standard) ;
use Win32::OLE ;
my $root = 'C:/Inetpub/wwwroot' ;
my $blast = "$root/port/blast" ;
open RUNBLAST2,
"| $blast/blastall" .
" -e .01" .
" -p blastp" .
" -d $blast/db/gbpoxpep" .
" -F F" .
" -m 7" .
" -o $root/webtemp/152895786322021484375.xml"
or die "Ouch: $!" ;
etc.
(untested)
--
Affijn, Ruud
"Gewoon is een tijger."
Dr. Ruud,
Thank you for the reply and the advice!
This script (below) runs fine from the command line, but not in IIS,
when browsed to from Internet Explorer. The error message is:
Ouch: Bad file descriptor at
c:\inetpub\wwwroot\port\blast\blast_xml_run_p.pl line 13.
Might you have any idea what causes the "Bad file descriptor" message?
Jim
#!perl
use strict;
use warnings;
use CGI qw(:standard);
use Win32::OLE;
my $root = 'C:/Inetpub/wwwroot' ;
my $blast = "$root/port/blast" ;
print header(), start_html(-title=>'Invalid Form Variables',
#-BACKGROUND=>'pebblebackgrd.gif',
-BGCOLOR=>'#FFFFFF');
open RUNBLAST2,
"| $blast/blastall" .
" -e .01" .
" -p blastp" .
" -d $blast/db/gbpoxpep" .
" -F F" .
" -m 7" .
" -o $root/webtemp/1528957863220214843.xml"
or die "Ouch: $!" ;
print RUNBLAST2 ">CNPV-WC93:007\nMKSYDDKVKE LYSAIESNDK";
close RUNBLAST2 ;
print end_html();
exit(0);
**************
Clarification:
The "line 13" from the error message corresponds to the "open
BLASTRUN2,..." line.
Jim
.
- Follow-Ups:
- Re: prematurely closed filehandle
- From: Jim Moon
- Re: prematurely closed filehandle
- References:
- prematurely closed filehandle
- From: Jim
- Re: prematurely closed filehandle
- From: Dr.Ruud
- Re: prematurely closed filehandle
- From: Jim
- prematurely closed filehandle
- Prev by Date: Re: How to ignore 1st line in a file when reading
- Next by Date: Re: prematurely closed filehandle
- Previous by thread: Re: prematurely closed filehandle
- Next by thread: Re: prematurely closed filehandle
- Index(es):
Relevant Pages
|
|