in reply to help in understanding the standard array shuffle
Q1) In this case:
- $i is initially assigned the length of the list (a list in scalar context returns the length).
- the loop runs while --$i (the "guard") is true. Basically it runs through the array backwards.
Q2)
- It looks a bit like a 2-D array, but it's actually
an array slice. It's swapping the contents of two
array elements. A 2-D array would have a $ rather than
a @ at the front.