Perl: How to run an POST/GET command via proxy?

Please what is the most simple way to run some perl command via proxy?

i have perl script an in it:

POST **something**
GET **something**

what should i do before it so its proxified via proxy without authentiffication, like 1.2.3.4:1080?

any way to run whole .pl script via proxy?

How are you doing POST and GET inside the perl script ?

You can use LWP as it supports extensive http client operations.

LWP - search.cpan.org

i dont understand perl and LWP, but this is what is basically in the script:

my $primarypl =
                        "$method /$num HTTP/1.1\r\n"
                      . "Host: $host\r\n"
                      . "User-Agent: $agent\r\n"
                      . "Content-Length: 42\r\n";

under method is post or get..

There has to be more than that. All that does is set a variable.