++ perrin, you where spot on. I'm using Apache::Request and so even when I declare a variable that would normally still be in the same scope as the sub I get these problems.
I think a package of constants sounds like the best solution so I'll start on that.
I've been avoiding OO until I get a little more comfortable with perl (seeing as this is my first project I've written).