# here's some more code if it helps sub label { my $self = shift; return "$self->{suit}$self->{value}"; } sub remove_card { my $self = shift; splice @{$self->{cards}}, 0, 1; } # Fisher-Yates shuffle sub shuffle { my $self = shift; use integer; my $i; for ($i = int(@{$self->{cards}}); --$i; ) { my $j = int rand ($i+1); @{$self->{cards}}[$i,$j] = @{$self->{cards}}[$j,$i]; } return $self->{cards}; }