in reply to Directory contents

File::Find will be what you are looking for
use File::Find; find(\&wanted, @directories_to_search); sub wanted { ... }
within the user defined sub wanted the following variables
have special meaning
$File::Find::dir is the current directory name $_ is the current filename within that directory