use List::Util qw( shuffle ); my @jumpedArray = map { $dataArray[$_*2+0], $dataArray[$_*2+1] } shuffle 0 .. @dataArray/2-1;