gautamparimoo has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks..
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
Thnx..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Random Files Recursively Form Directory
by CountOrlok (Friar) on Apr 01, 2013 at 14:19 UTC | |
by gautamparimoo (Beadle) on Apr 02, 2013 at 05:07 UTC | |
by CountOrlok (Friar) on Apr 02, 2013 at 13:01 UTC | |
by gautamparimoo (Beadle) on Apr 03, 2013 at 05:22 UTC |