"Eduardo M. Cavalcanti" wrote:
> At 11:35 20/5/2002 +0200, you wrote:
> 
> Do this:
> 
> my @content = (  hgapresidues=>'R',  hgapresidues=>'N' ,   hgapresidues=>'D'   )
> # each element of the array is a scalar
> 
> then
> 
> use HTTP::Request::Common;
> my $ua = LWP::UserAgent->new;
> my $response = $ua->request(POST 
> 'http://bioweb.pasteur.fr/cgi-bin/seqanal/clustalw.pl',
>                  Content_Type => 'form-data',
>                  Content=>\@content);
> Filling with the other required parameters it should work. Please let me 
> know if this does not work or is not clear.

It worked perfectly, thank you:

    foreach my $v (@values) {
                push (@content, "hgapresidues" => $v);
    }

    my $res = $ua->request(POST $remote,
                           Content_Type => 'form-data', 
                           Content      => \@content);

I'm just surprised that, in perl, a hash may have several occurrences the same key! :-)

> 
> 
> >where some fields correspond to multiple selection, e.g where the http content
> >should be something like this:
> >
> >-----------------------------47562017819979007331448329698
> >Content-Disposition: form-data; name="hgapresidues"
> >
> >R
> >-----------------------------47562017819979007331448329698
> >Content-Disposition: form-data; name="hgapresidues"
> >
> >N
> >-----------------------------47562017819979007331448329698
> >Content-Disposition: form-data; name="hgapresidues"
> >
> >D
> >-----------------------------47562017819979007331448329698
> >Content-Disposition: form-data; name="hgapresidues"
> >
> >Q
> >-----------------------------47562017819979007331448329698
> >Content-Disposition: form-data; name="hgapresidues"
> >
> >E
> >
> >etc...
> >
> >I have tried many possibilities for filling the %content array in order
> >to get this result, but without any success. Could someone help?
> >
> >(Besides this, everything work perfectly).
> >
> >Thanks!
> >

--
Catherine Letondal -- Pasteur Institute Computing Center

Reply via email to