Can I suggest you have a look at File::Find::Rule
. It makes picking up the exact files you want from your start directory, a lot easier. It returns an array of found files with the full path, so you can pass that straight to open and get the contents of only the files you want. It can get rid of several lines of checking for . .. and any other system type files.
Excluding core modules, it's my most used module.
Birmingham Perl Mongers
Web Site: http://birmingham.pm.org/