in reply to Re^2: How to conditionally terminate finddepth?
in thread How to conditionally terminate finddepth?
I once suggested an official breakout function to the perl5-porter, to be used likemy $newfile = undef; finddepth( sub { if (-M $_ <= 30){ $newfile=$File::Find::name; goto done_finddepth; } }, $base ); done_finddepth: die "the new file is $newfile";
but nothing came of it. File::Find's way of doing things can mess with your head.my $count = 0; &find( sub { $count++; File::Find::breakout() if $count == 500; }, '/');
|
|---|