use strict; use warnings; use URI; use Data::Dumper; use Tie::Hash::MultiVal; my $uri = URI->new('http://foo.com/bar.cgi?foo=bar&foo=baz&bar=qux&baz=qux'); my %hash; tie %hash, 'MyHash'; %hash = $uri->query_form(); @hash{qw(foo bar baz qux)} = qw(one two three four); delete $hash{foo}; print Dumper \%hash;