A slightly simpler approach than jdrago999's above is to use these built-in perl functions to achieve your objective:
Do you think? I think File::Find would be the simpler approach... it does a lot for you. I'd do it something like this (untested):
#!/usr/bin/perl use warnings; use strict; use File::Find; use Cwd qw(abs_path); sub w { -d && print $File::Find::name,$/ } File::Find::find( {wanted=>\&w}, abs_path($_)) for @ARGV;
In reply to Re^2: listing all subdirectories of directory into file
by sauoq
in thread listing all subdirectories of directory into file
by tevolo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |