use File::Find; my @dirlist = ('dir1', 'dir2', 'dir3'); foreach my $dir (@dirlist){ eval { find( \&wanted, $dir }; }; # Does NOT work when passing a reference to foo to the find module # eval { bar() }; }; # DOES work when just calling a subroutine directly if( $@ ){ print "$dir had error: ".$@; } else { print "processed $dir\n"; } } sub wanted{ die "haha!"; } sub bar{ die "haha!"; }