- or download this
#!/usr/bin/perl -w
use strict;
use Getopt::Std;
...
}
printf "%10d $_\n", $size{$_} for @sorted[0 .. $maxidx];
- or download this
find( { wanted => \&print_if_dir, }, @dirs);
# or
find( { wanted => sub { print if -d }, }, @dirs);
- or download this
find( {
preprocess => sub { return grep { -d } @_ },
wanted => sub { print },
}, @dirs);
- or download this
my ($min_depth, $max_depth) = (2,3);
find( {
...
return if $depth < $min_depth;
print;
}
- or download this
#!/usr/bin/perl -w
use strict;
use Getopt::Std;
...
wanted => sub { unlink if -f $_ and -M _ > $max_age_days },
postprocess => sub { rmdir $File::Find::dir },
}, @ARGV);