use File::Find; find(\&listAll, "c:\\"); sub listAll [ print "$File::Find::name\n"; ]