How can I turn a hash into a query string? I would like to find a solution that doesn't involve using the CGI module. Here's an example of what I'm wanting to do but don't know what the best and most elegant approach would be, since I'm relatively new to Perl.
Hash:
my $data = {
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3',
'key4' => 'value4'
};
To desired query string:
key1=value1&key2=value2&key3=value3&key4=value4