While this doesn't answer your question directly, as your needs grow from saving state to maintaining state via sessions etc. you may want to check out Apache::PageKit
, which automagically provides all these things in a mod_perl environment. The documentation is a bit sparse, but once you get comfortable with the framework, it is a godsend.
You may also want to take a look at HTML::FillInForm which will allow you to later prepopulate an HTML form with the state you saved earlier. HTML::FillInForm is used by PageKit, so if you use the latter you get the former for free.
Hope this helps :-)