in reply to reading files and directories

Peronsally I use like using the File::Find module. It will rip through a directory tree recursively. Along the way each folder it visits you can specify what you want it to do via a referenced subroutine, and it uses several variables such as $File::Find::Dir (current directory) and $_ (filename)and $File::Find::name (full path of file) to refer to what its currently processing. This makes it easy to refer to the files on the fly.

Dean