#!/usr/bin/perl -w use List::Util qw(shuffle); use strict; use warnings; my @cards = (2..10,qw(J Q K A)); my @suits = qw(h d c s); my @deck = map {my $suit = $_; map {"$_$suit"} @cards} @suits; my @newdeck = shuffle(@deck); print "@newdeck\n";