Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Is there a way to set max results on File::Find::Rule?by runrig (Abbot) |
on Dec 20, 2007 at 02:01 UTC ( [id://658041]=note: print w/replies, xml ) | Need Help?? |
It sounds like you want something more like File::Find::Object (update: or File::Next), which has an iterator interface, so you can stop fetching files whenever you want to. I've never used this module so I can't comment on it much. The docs also mention other iterator-based modules, which I haven't used either.
Alternatively, you could die in File::Find when you're done fetching (wrapping find() in an eval), but then you couldn't continue.
In Section
Seekers of Perl Wisdom
|
|