our @filelist = (); our $fdir = "/usr/blah" find(\&wanted, $fdir); die " cannot get file list: $!" unless(@filelist>0); #assuming the directory exists, @filelist now has all files in blah including subdirs. sub wanted { my $thisfile = $File::Find::name; push(@filelist, $thisfile) }