This is not really the way perl works as such, but more along the lines of the stateless nature of HTTP.
There are numerous ways to maintain state that include:
- Tied hash
- A database
- regular old file
- hidden fields in the page...
In fact any method of retrieving the data can be used. The interesting part of maintaining state come along when you want to retrieve the data associated with a particular "session". You have to work out a method of branding the browser, then retrieving that branding and associating it with the data you've stored server side.
There are three main methods of branding a browser, cookies, in the URL and using hidden variables in your pages...
I wont go into detail, however, there is a wealth of information available all over the web, and here on perl monks.