in reply to store the output of the request to the db - instead of printing
http://perlmaven.com/multi-dimensional-hashes
If you wish to actually serialized it, I'd look at the JSON::XS module.