#!/usr/bin/perl use strict; use warnings; use LWP; my $url = 'http://localhost/echo.cgi'; my $ua = LWP::UserAgent->new; my $res = $ua->post ($url, { foo => ['bar', 'baz'] }); print $res->as_string;