use File::Glob qw(bsd_glob); foreach my $dir (bsd_glob("*")) { foreach my $file (bsd_glob("$dir/*")) { print "file [$file]\n"; } }