Perhaps someone else can answer more authoritatively, but my understanding of global variables is that
- a) they're slower to access than local counterparts; and
- b) in mod_perl they are persistent and take up space while your script isn't executing, and leave the environment "dirty" for the next time the CGI is called
Emptying the hashes will fix problem (b) but they can't help you with (a). Unless you're doing a lot of data crunching, though, this might be an acceptable loss, though in my opinion it's still slightly poor coding practice, but you could do a lot worse.