500 (Internal Server Error) Not a SCALAR reference
Client-Date: Mon, 04 Mar 2002 20:42:13 GMT
####
#!/usr/bin/perl -w
use strict;
use Getopt::Std;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use vars qw($ua);
my %opts;
getopts('hp:d:i:o:e:v:b:F:', \%opts);
my $PROGRAM = $opts{'p'};
my $DB = $opts{'d'};
my $INFILE = $opts{'i'};
my $OUTFILE = $opts{'o'};
my $ESCORE;
my $V;
my $B;
my $F;
if (defined $opts{'e'}) {
$ESCORE=$opts{'e'};
} else {
$ESCORE=0.01;
}
if (defined $opts{'v'}) {
$V=$opts{'v'};
} else {
$V=10;
}
if (defined $opts{'b'}) {
$B=$opts{'b'};
} else {
$B=10;
}
if (defined $opts{'F'}) {
$F=$opts{'F'};
} else {
$F='T';
}
#--------------------------------------------------------------
my $seq="GCAGCAGGTCGGTAGGCGGGAAATGGCGACTGGCTGAAGGAGCTGGTTCTGTTGCTGCTGCGGGGTAAGCGGGAAAGACACCACACA";
$DB = 'baygenomicsdb';
$ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST => 'http://baygenomics.ucsf.edu/db/cgi-bin/blast/blast.cgi');
$req->content_type('form-data'); #also tried 'application/x-www-form-urlencoded'
$req->content( [ PROGRAM => $PROGRAM, DATALIB => $DB,
SEQUENCE => $seq,
EXPECT => $ESCORE,
DESCRIPTIONS => $V, ALIGNMENTS => $B ]);
print $ua->request($req)->as_string;
####
$ ./test-post.pl -p blastn -d hs_all.fa -i test.in -o test.out