#!/usr/bin/perl use warnings; use strict; use File::Find (); # See the Cookbook p.324 to sub find (&@) { &File::Find::find } # call find like grep or map my $start = 'd:/temp'; find { find_again($_) if (-d && !/^\./)} $start; sub find_again { my $found = $_; print "First find found: $found\n"; print "Second find found dirs:\n"; find { print "$_\n" if (-d && !/^\./)} $found; } __END__ Directories are: d:/temp/one/a /b /c /two/d /e /f /three/g /h /i OUTPUT: First find found: two Second find found dirs: d e f d e f one a b c three g h i