Not my areas of knowledge--*nix nor Apache--but two things ring bells in my head.
- If you are running under a persistant environment--mod_perl or fastcgi--isn't the use of global variables problematic?
- Why are you passing the return value of undef to tie?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.