good chemistry is complicated,
and a little bit messy -LW
Random Files Recursively Form Directoryby gautamparimoo (Beadle)
|on Apr 01, 2013 at 08:52 UTC||Need Help??|
gautamparimoo has asked for the
wisdom of the Perl Monks concerning the following question:
I have the following specifications to search a given directory(recursively) totally random with following limitations:
I thought over it and saw old nodes which gave me these strategies:
1. Use File::Find to recurse and then use shuffle in List::Util to get random files and then scan those random files.But this will create a very large array which contains the address of random files selected and also time will be significantly more.
2. Use file::find to recurse and simultaneously use rand function to sect file and then scan it immediately and then move to next random file. I do not know how to work in this approach
3. A module File::Random exists but it does not work for Windows as written in its limitations.
Also I am not able to decide how to implement the max size check(as told above). please provide guidance? Example codes or other approaches
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. -Elbert Hubbard