in reply to CGI.pm saving state to database

Some of the other answers in this thread talk about "saving the CGI object", but you really don't need to save all of that. If you're looking to just save the key/value pairs, create a quick HoA like this:
use CGI qw(param); my %ParamSaver = map { $_ => [param($_)] } param();
then dump %ParamSaver by any means you are familiar with. Once restored, you can load them into the new CGI object with:
# presume %ParamSaver has been fetched... use CGI qw(param delete_all); delete_all(); # reset all parameters for (keys %ParamSaver) { param($_, @{$ParamSaver{$_}}); }

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.