in reply to retrieving cookies with CGI::Cookie

You should be using value, as per the documentation. value returns a hash when the a hash was used to create the cookie.

%user_data = $cookies{'user'}->value; print($user_data{field1}, "\n"); print($user_data{field2}, "\n");

assuming you used the following to create it:

$user_cookie = new CGI::Cookie( -name => 'user', -value=> { field1 => 'value1', field2 => 'value2', } )

By the way, the cookie will look something like:

user=field1&value1&field2&value2; path=/