Hello Monks,
I think this is one of already asked questions!
I want the script to list all the directories that are at some depth which will be specified by the user.
The code I have is finding all the directories recursively. I want only at a particular level.
use Cwd; use File::Find; my $dir = getcwd; find(\&print_name_if_dir, "$dir"); sub print_name_if_dir { if (-d) { print $_."\n"; } }
Thanks
In reply to Finding directories at a variable depth by uday_sagar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |