use Math::Random::MT::Auto 'shuffle'; my @cards = 0..51; shuffle(\@cards);