Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am using File::Find to process a directory hierarchy. Some of the files are symlinks that I must follow. What I want to do is randomise the processing order of the files, something like this:
However, preprocess is a noop when follow symlinks is on. Could anyone suggest an alternative approach to meet my goal. Thank you very much for your help, Greg. (first time poster)PS if you are curious, this is part of perl script that is run > 100x on a cluster to process 1000s of 3d brain images. I use simple file locks to make sure that only one job is running on any image. Unfortunately file locking on NFS is not very reliable (and I am already taking precautions). What happens is that if I start 100x jobs at once everyone tries to grab the same file and it's a mess. So I want to scramble the processing order of files to reduce the number of possible collisions to put less pressure on the file locking mechanism. In reply to randomising file order returned by File::Find by jefferis
|
|