Or use File::Next or File::Find::Object which are iterators that you can stop whenever you like.use File::Find qw(find); my @files; my $result = eval { find(sub { return unless -d; push @files, $File::Find::name; die "FILE_FIND_DONE\n" if $all_done }, $dir); 1; }; unless ($result) { die $@ if $@ !~ /^FILE_FIND_DONE/; }
In reply to Re: Stopping File::Find::Rule
by runrig
in thread Stopping File::Find::Rule
by eff_i_g
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |