use URI; my $uri = URI->new('http://localhost/foo.cgi?foo=bar&foo=baz'); my @result = $uri->query_form; print join(":", @result), "\n";