in reply to Print the contents of a hash without looping.
When a hash is in LIST context Perl converts a hash into a list of alternating values - see https://perlmaven.com/perl-hash-in-scalar-and-list-context. Alternatives are ;
pojmy @array = %hash; say "@array"; my $aref = [%hash]; say "@$aref";
|
|---|