in reply to How do I recursively process every file in a given directory?

use File::Find; find (\&wanted, $DIRECTORY); sub wanted { # this subroutine gets called once for each file # Inside this subroutine, $_ is set to the # name of the current file and the current # directory is the directory where that file # is stored }

See the manual for File::Find for more complete details.