#!/usr/bin/perl -w use LWP::UserAgent; use HTTP::Request::Common qw(POST); print "Hello Everybody!\n"; open (PSTRINGS, "pstrings.txt") || die "Protein string file missing!"; @proteins=; close (PSTRINGS); my $url = 'http://pbil.ibcp.fr/cgi-bin/simsearch_blast.pl'; my $ua = LWP::UserAgent->new(); my $req = HTTP::Request->new(POST => $url); open (OUTPUT, ">output.htm"); foreach $protein (@proteins) { chomp($protein); print "$protein\n"; $req->content_type('application/x-www-form-urlencoded'); $req->content("optp=blastp&optd=SWISSPROT%2BSPTrEMBL&title=PerlScript+Protein¬ice=$protein"); my $res = $ua->request($req); print OUTPUT $res->as_string ; print "Blast Search Result Written\n" }