my @suits = < ♣ ♢ ♡ ♠ >; my @ranks = 2..10, < J Q K A >; # concatenate each rank with each suit (2♣ 2♢ 2♡ ... A♠) my @deck = @ranks X~ @suits;
The X~ operator combines each rank with each suit to produce 52 strings:
["2♣", "2♢", "2♡", "2♠", "3♣", "3♢", ..., "A♡", "A♠"]