use File::Find; print "Enter your root directory\n"; $root = ; sub process_file{ print $File::Find::name if -f ; } find (\&process_file,$root);