3 ms·
You probably mean: `@{ $hash->{array_ref} }` or `@{ $hash(array_ref) }`. Either way shows exactly what is the structure of `hash`.
by popovmp 7y ago
You probably mean: `@{ $hash->{array_ref} }` or `@{ $hash(array_ref) }`.
Either way shows exactly what is the structure of `hash`.
- petre 7y ago%hash is an actual hash with a nested array ref inside. If $hash is a reference to such a hash, yes. Never used the second syntax and I doubt that it works with something other than subroutines, but in that case it's either hash() where hash is an actual sub, or $hash->() where $hash is a subroutine reference. Both return an array refetence. See? Confusing. That's why people hate Perl. At least I'm glad dereferencing is gone in Raku.