However if I change the $dir as follows it does not work (I am aware technically //192.168.1.44 is not a directory but a share)use Path::Tiny; my $dir = '//192.168.1.44/somedir'; my @files = path( $dir )->children( qr/\.txt\z/ ); #Excludes "." and " +.." automatically. my @myDirectories = path( $dir )->children; for my $dirName ( @myDirectories ){ print "$dirName\n"; }
I get the following error when running the above codeuse Path::Tiny; my $dir = '//192.168.1.44'; # traverse root my @files = path( $dir )->children( qr/\.txt\z/ ); #Excludes "." and " +.." automatically. my @myDirectories = path( $dir )->children; for my $dirName ( @myDirectories ){ print "$dirName\n"; }
Error opendir on '//192.168.1.44': Invalid argument at dir.pl line 44.
In reply to Re^2: File::Find - Traverse the first level directories from starting point - How?
by vskatusa
in thread File::Find - Traverse the first level directories from starting point - How?
by vskatusa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |