sub do_stuff { my $full_path_to_file = $File::Find::name; ... } my $sub_ref = \&do_stuff; #or find(\&do_stuff, $start_dir); #### print "The number of people was: $count.\n"; #### for my $val (@vals) { ... ... } #### use strict; use warnings; use 5.010; #if using perl 5.10+