Sounds like you need a simple session object to keep track of things for you. This would have a session id that can be passed around via cookies or by the URL. Then you use that session id to reanimate an old session or create a new session if one isn't already found. Here are a few things to chew on:
- You definately want to use a database. Which rdbms is an exercise left up to you as you know your requirements best.
- use Digest::MD5 qw(md5_base64) to generate your session ids. Start with something like md5_base64(localtime() . rand() )
- If everything is going to be perl, use your backend storeage to store your session objects data cargo serialized (use Data::Serializer for example). This will simplify your initial module letting you get on to the juicier parts. Keep your interface clean and simple so that you can swap this out later if needs be.
- Don't forget the useful things to track such as the last requested page, ip address, time, etc. This is a great opportunity to unify your session handling with some form of db logging.
- You might also benefit from the use of mod_perl.
You can easily roll your own, or take a look at Apache::Session.
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."