Two thoughts, the usual why not use File::Find, '-w' and 'use strict;'
and aren't you stompling on your directory handler by opening
multiples with the same name?
You might at least look at DirHandle since that makes
you create a new object for each directory handle you
open.