Hi all, one more time I need some help. In the past I have used the libwww-perl module to execute and get the information from that remote web server. This was actually quite simple because I did not have to post any data. Now I wrote an script that it will have to post some data to the server and then retrieve the information. However, I am a little bit lost because the server in question (http://www.cbs.dtu.dk/services/TMHMM/) runs the job in the background, and then it sends you to a result page latter, and I do not know how to get there. The site I am working with is at the url http://www.cbs.dtu.dk/services/TMHMM/, and here is my script:
#!/usr/sbin/perl -w use strict; require HTTP::Message; use HTTP::Request::Common; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $FILE = shift @ARGV; my $res =$ua->request(POST 'http://www.cbs.dtu.dk/cgi-bin/nph-webface', Content_Type => 'form-data', Content => [configfile =>'/home/genome2/www/Public_html/services/TMHMM-2.0/TMHMM2.cf', outform => '-short', seqfile => ["$FILE"]],); my $req =$ua->request(GET 'http://www.cbs.dtu.dk/cgi-bin/nph-webface?jobid=TMHMM2,$res&opt=none');# my @lines = split(/\n/, $ua->request($req)->as_string); my $count = @lines; for (my $y = 0; $y < $count; $y++) { if ($lines[$y] =~ /^Sequence/) { print $lines[$y],"\n"; } } ######## I am running the script as it follows: %script.pl file; where file is: >gi|75188|pir||QQIVE1 hypothetical 18K protein - influenza A virus (strain A/PR/8/ 34) MLFAQNYSLLSSVCVSLLQSTILFLQTSDLIVPAISRFCFGVSGGLPFSLLLLQANLCRVSETRTVLSFH SSPPMRTPTAFLTSSAVCPGREGNGEISPTIAPSSVKALSNIRVSSRSKITLKFAFSMMFLSMIAWSILI QRGPATFCLGMSMDQSLDISSRVMSVR* When I run the script I got the following message: You need a request object, not a HTTP::Response object at ./ranseq.pl line 19 As I said I am a little bit lost, and I will be very happy for any help on the subject. Cheers ******************************************************************* PEDRO A. RECHE , pHD TL: 617 632 3824 Dana-Farber Cancer Institute, FX: 617 632 4569 Harvard Medical School, EM: [EMAIL PROTECTED] 44 Binney Street, D1510A, EM: [EMAIL PROTECTED] Boston, MA 02115 URL: http://www.reche.org *******************************************************************
