in reply to Re: listing all subdirectories of directory into file
in thread listing all subdirectories of directory into file
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: listing all subdirectories of directory into file
by NetWallah (Canon) on May 26, 2012 at 04:55 UTC | |
by sauoq (Abbot) on May 26, 2012 at 06:38 UTC | |
|
Re^3: listing all subdirectories of directory into file
by aaron_baugher (Curate) on May 26, 2012 at 16:39 UTC | |
by jdrago999 (Pilgrim) on Jun 08, 2012 at 17:23 UTC | |
by aaron_baugher (Curate) on Jun 08, 2012 at 22:35 UTC |