in reply to foreach keys possible using a hash reference?
So, where you normally would write
you now replace hash with a block returning a reference to a hash, and you get:keys %hash
The block has a very, very simple statement, the statement is just an expression consisting of a single variable. As an extra feature, in such a simple expression, you may omit the braces, so you will end up with:keys %{$hashref}
keys %$hashref
Abigail
|
|---|