please help me to check why this perl script does not work!



I wish to submit some protein sequences via LWP:UserAgent to the
http://www.cbs.dtu.dk/services/ChloroP/

The error message is given as follows:

<HTML><HEAD><TITLE>Webface Error</TITLE></HEAD><font
color=red><h1>Webface Error: </h1><h4>
Read: Field not declared; 'seqpaste'</h4>
<br>
</font></HTML>

*********************************


#! /usr/bin/perl -w
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;

my $browser = LWP::UserAgent->new;
my @seq;
my $count =0;

my $infile = "my_test_file"; #input my Fasta file

open INPUT, "$infile" or die "can not open $infile:$!";
open OUTPUT, ">>$infile.ChloroP.res" or die "Cannot create the output file: $!";

@seq = <INPUT>;
my $total = @seq;

foreach my $item (@seq){
$count ++;
chomp $item;
my $response =
$browser->post('http://www.cbs.dtu.dk/cgi-bin/nph-webface',
[ "SEQPASTE" => "$item",
"submit" => "Submit"]
);
warn "WARN!: ", $response->status_line, "\n" unless
$response->is_success;

if($response->is_success){
my $result = $response->content;
open OUTPUT, ">>$infile.ChloroP.res" or die "Cannot
create the output file: $!";
print OUTPUT "$result\n";
print OUTPUT "\n*********************************\n\n\n";
}
print "$count of $total finished\n";
}

close OUTPUT;
close INPUT;
.



Relevant Pages

  • Re: out of memory problem
    ... use strict; ... variable in the error message so you know *why* it ... foreach my $dir { ...
    (perl.beginners)
  • Re: Stackdump issues
    ... I have run the executable once again and on a secondary output file I get ... Try putting an iostat= with an integer variable on the read. ... system's error message instead of just a numeric code. ...
    (comp.lang.fortran)
  • Re: Problem with useless use error message
    ... >> the output file password, then close the two file handles for the ... > strict, you would have caught this error. ... [root@localhost james]# cat program.pl ...
    (comp.lang.perl.misc)
  • Re: check existence of element in a list
    ... > list just appended on the output file. ... > use strict; ... you're putting the stuff from pclist.txt into @smsclient and vice ... open my $fh, 'smsclient.txt' or die $!; ...
    (perl.beginners)
  • Re: A MusicMan query
    ... all stops and I get this ... Unable to open output file ... As the error message ... the problem is that it could not open its output file. ...
    (comp.sys.acorn.apps)