Mã:Làm thế nào để tham khảo giá trị trả về của một perl phụ
my $compare = List::Compare->new(\@hand, \@new_hand);
print_cards("Discarded", $compare->get_Lonly()) if ($verbose);
print_cards
hy vọng (vô hướng, tham chiếu đến mảng).
get_Lonly
trả về mảng. Cú pháp để chuyển đổi nó thành một tham chiếu để tôi có thể chuyển nó tới print_cards là gì? Ví dụ: \@{$compare->getLonly()}
không hoạt động.
Cảm ơn!