Created
February 2, 2012 08:37
-
-
Save vifo/1722379 to your computer and use it in GitHub Desktop.
Perl File::Find example
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
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use File::Find; | |
sub wanted { | |
my @stat = stat $_; | |
print Dumper(\@stat); | |
# hint: perldoc -f stat | |
# http://perldoc.perl.org/File/Find.html | |
} | |
find(\&wanted, '.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment