Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use File::Find; #use strict; #use warnings; my $dir = "1.0.0"; defined $dir or die "usage: timer.pl [DIR]\n"; #find(\&show_subs, $dir ); find sub {$fsize += -s},"\&calc_sub, $dir"; print $fsize; sub calc_sub { if ( -d ) { if ( $_ eq '.svn' ) { # don't traverse into subversion related directories $File::Find::prune = 1; return; } # for directories, only print path print "$File::Find::name\n"; return; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: File::Find::prune problems
by hbm (Hermit) on Jan 20, 2009 at 02:49 UTC | |
by Anonymous Monk on Jan 20, 2009 at 21:33 UTC |