in reply to randomising file order returned by File::Find
- Push the filenames into a list
- shuffle the list
- process the elements on the list.
use File::Find; use List::Util qw(shuffle); my @files; find({wanted => sub { push @files, $File::Find::name }, follow => 1}, +$somedir); @files = shuffle @files; process_file($_) for @files;
In Section
Seekers of Perl Wisdom