foreach $suit (@allsuits) { my $i = 1; foreach my $card (@suitcards) { push( @arraysuit, "$card$suit" ); if ( $i == 1 ) { push( @aces, "$card$suit " ) } if ( $i == 2 ) { push( @twos, "$card$suit " ) } if ( $i == 3 ) { push( @threes, "$card$suit " ) } if ( $i == 4 ) { push( @fours, "$card$suit " ) } if ( $i == 5 ) { push( @fives, "$card$suit " ) } if ( $i == 6 ) { push( @sixes, "$card$suit " ) } if ( $i == 7 ) { push( @sevens, "$card$suit " ) } if ( $i == 8 ) { push( @eights, "$card$suit " ) } if ( $i == 9 ) { push( @nines, "$card$suit " ) } if ( $i == 10 ) { push( @tens, "$card$suit " ) } if ( $i == 11 ) { push( @jacks, "$card$suit " ) } if ( $i == 12 ) { push( @queens, "$card$suit " ) } if ( $i == 13 ) { push( @kings, "$card$suit " ) }