Global variables are generally seen as a bad thing, and should be avoided. When you 'use strict;' you must declare all of your local variables with 'my' as discussed in this node.
Comment on Re: (Insistence on Local Variables) Returning array of file names form find using local variables?