Values & References2 / 18
Up next

Hash reference

use strict;
use warnings;
use feature 'say';

my %h = (a => 1, b => 2);
# \% references a named hash
my $ref = \%h;
# %{ } derefs the whole hash
my @k = sort keys %{ $ref };
say "@k";
# arrow accesses one value
say $ref->{a};
What you're solving

\% and %{ } deref