use File::Find; use strict; my $StartDir = shift || do { die "No argument given. Resubmit with parameter.\n"; exit 0; }; sub processSub { #do stuff here } find(\&processSub, $StartDir); #rest of script.... #### chomp $StartDir;