in reply to Very Large Arrays
Not directly related to you problem, but Perl comes with a built in shuffle.
use List::Util 'shuffle'; my @A = qw- 1 2 3 4 -; @A = shuffle @A; say "@A";
In Section
Seekers of Perl Wisdom