Perhaps a little bit easier using some perl idioms...
#DECK MAKER sub deck_maker { my @deck = (); #the deck for returning my @suits = qw( spades hearts diamonds clubs ); my @cards = ( 2..10, qw(J Q K A) ); for my $suit ( @suits ) { for my $card ( @cards ) { my $newcard = "$card of $suit"; push(@deck, $newcard); } } return @deck; #return the new deck }
--MidLifeXis
In reply to Re^2: What I am missing here
by MidLifeXis
in thread What I am missing here
by heatblazer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |