my $dir = shift || "client"; my @list = (); for( glob "*$dir*" ){ -d or next; for( glob "$_/*" ){ -d or next; push @list, $_; } } $" = $/; print "@list" __END__ client1/DIR_1 client1/DIR_2 client1/DIR_3 client2/DIR_1 client2/DIR_2 client2/DIR_3 client3/DIR_1 client3/DIR_2 client3/DIR_3
In reply to Re: Get list of first level subdirectories
by sh1tn
in thread Get list of first level subdirectories
by gwhite
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |