in reply to sending a request to a web page
There are several ways, which can be devided into a GET and a POST.
For simple requests, I prefer LWP::UserAgent.
This is very simple:
I hope this helpsuse LWP::UserAgent; my $url="http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi"; my $ua=LWP::UserAgent->new(); foreach my $i ( 0..10 ) { # create your own loop here my $rform= { val => $i, dba =>"Nucleotide", dopt =>"xml", txt =>"on", }; my $request=$ua->post($url, $rform); if ($request->is_success) { print $request->content; # do what you like here } else { print $request->error_as_HTML; } }
|
|---|