use File::Find::Rule qw/ find rule /; my @userdirs = rule( 'directory' , maxdepth => 1, )->extras({ follow => 1 }) ->in( 'startdir' ); ...