Created
January 23, 2011 17:54
-
-
Save xaicron/792274 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Win32::Unicode; | |
my $dir = '.'; | |
my_find($dir); | |
sub my_find { | |
my ($dir) = @_; | |
chdirW $dir or die "$dir: $!"; | |
sayW "dir: $dir"; | |
my $wdir = Win32::Unicode::Dir->new; | |
$wdir->open('.'); | |
my @files = $wdir->fetch; | |
$wdir->close; | |
sayW join "\n", map { "[$_]" } @files; | |
for my $file (@files) { | |
next if $file =~ /^\.{1,2}$/; | |
next unless file_type d => $file; | |
my_find($file); | |
chdirW '..' or die "$file/../: $!"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment