kepler has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I want to use in Perl the equivalente expression in Php:

curl -F "targets=@<filename>" "http://mydomain.com/script.php?<args>"

I provide a filename with text data (<filename>) and the args (<args>).

So it's a Post and Get request at the same time...

Any ideas?

Kind regards,

Kepler

Replies are listed 'Best First'.
Re: curl in Perl (GET and POST)
by Laurent_R (Canon) on Aug 22, 2015 at 09:42 UTC
Re: curl in Perl (GET and POST)
by hippo (Archbishop) on Aug 22, 2015 at 13:46 UTC
    So it's a Post and Get request at the same time... Any ideas?

    It's just a POST where the URL being posted to has a query string. See the POST section of the LWP cookbook for examples of how to do this in Perl.

Re: curl in Perl (GET and POST)
by Anonymous Monk on Aug 22, 2015 at 09:00 UTC