Thanks everyone for the fast and on-point responses to my question. Not only do I now understand that 'my' is almost always preferable to 'local', but some kind souls suggested that I start using Lincoln Stein's CGI module. It will indeed save me a lot of time.