Does anyone know how to randomly shuffle two arrays in exactly the same way in Perl? For example, let's say I have these two arrays:
Before shuffling: array 1: 1, 2, 3, 4, 5 array 2: a, b, c, d, e
After shuffling: array 1: 2, 4, 5, 3, 1 array 2: b, d, e, c, a
Thus, each element in each array is tied to its equivalent element.
Abdel source
share