COM (1976) 728 - COM (1976) 697-3 #### #!/usr/bin/perl -w use strict; use WWW::Mechanize; use LWP::Simple; my $agent = WWW::Mechanize->new(); $agent->get("http://europa.eu.int/prelex/rech_avancee.cfm?CL=en"); $agent->form(2); $agent->field("clef2", "1999"); $agent->field("clef1", 'COM'); $agent->field("nbr_element", '99'); $agent->click(); my @pcp=(1, 100, 199, 298, 397, 496, 595, 694, 793, 892, 991, 1090, 1189, 1288, 1387, 1486, 1585, 1684, 1783, 1882); my $pcp; foreach $pcp (@pcp) { my @input; @input=get("http://europa.eu.int/prelex/liste_resultats.cfm?PCP=$pcp\&CL=en"); my $input; foreach $input (@input) { open RESULTS, ">>C:/programme/perl/test/result.txt"; print RESULTS "$input\n"; close(RESULTS); } }