in reply to Dancer Sessions

Which session-engine are you using?

Update: I have tried your script in a simple Dancer test application and it works fine using the YAML session engine.

I even tried opening multiple sessions (one in FireFox, one in IE) and the page-visit counters in each browser were kept independent of each other without any problem.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James