in reply to Re: File::Find - Traverse the first level directories from starting point - How?
in thread File::Find - Traverse the first level directories from starting point - How?
use Path::Tiny qw/ path cwd /; my $dir = '//192.168.1.44/somedir'; my @files = path( $dir )->children; my @myDirectories = path( $dir )->children; for my $dirName ( @myDirectories ){ if (!( $dirName =~ m/\/\./ )) { # skip dir like /xxxx/.xx print "$dirName\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [Soved] Re^2: File::Find - Traverse the first level directories from starting point - How?
by 1nickt (Canon) on May 19, 2020 at 05:47 UTC |