Remember that the World Wide Web is intrinsically stateless (See What is stateless?), and this means that "trying to persist an application across web requests" is going against the grain from the outset.
It might be conceptually easier to think of your "persistent" application in client-server terms, where you interact with your application (server) using a web browser (client) to communicate messages. For example, your server application could respond to client "messages" that are queued in a file, taking action when it encounters new messages.
On the other hand, if you really want to persist with persistence <grin> then there are various options such as cookies (client side persistence) or CGI::persistent (server side persistence).
Good luck, and let us know what you decide.