use File::Find; find(\&wanted, shift(@ARGV)); # I would like the @dirlist here # but I can't get it returned for the life of me. exit; sub wanted { return unless -d $_; my @dirlist; push(@dirlist,$File::Find::name); return(@dirlist); } #### use strict; use File::Find; sub main; my @dirlist; main(); exit; sub main { findit(); dostuff($_) for @dirlist; } sub findit { find(\&wanted, shift(@ARGV)); } sub wanted { return unless -d $_; push(@dirlist,$File::Find::name); } sub dostuff { print "$_\n" }