Clear questions and runnable code
get the best and fastest answer
It doesn't need to be OO, but as you progress you'll find it's much easier to build modules out of your code and then use them in your applications.
You are correct about globals, programming under mod_perl is what finally got me into the habit of using my.
Saying what everyone else has said in a different way:
Since you're running on Windows, remember that you're going to be loading and unloading perl.exe and the perlxx.dll for every request. This can begin to fragment your memory over time. XP reclaims memory much better than NT did, neither as well as a *nix will. Consider a thousand requests coming in, each loading an interpreter and parsing a script, each with a footprint of between 2mb and 10mb each. This can eat up memory very quickly.
I suggest opening up task manager and adding the mem usage, vm size, and peak mem usage columns to the processes page. Then try to fire up 10 (or as many as you can) connections to your script and watch the processes come in and out. It's a real simple and fast way to see how that's going to scale. I think somebody posted a simple stress test here before, you could easily do it with a quick POE script as well.