http://qs1969.pair.com?node_id=266082


in reply to How do I shuffle an array?

The List::Util module provides a shuffle function which implements the Fisher-Yates shuffle.
use List::Util qw(shuffle); my @data = (0..51); my @cards = shuffle @data;