my @array = ( 1, 2, 3 ); my %hash = ( a => 1, b => 2, c => 3 ); # take a reference to the array my $aref = \@array; # take a reference to the hash my $href = \%hash; # access the entire array through its reference my $elem_count = scalar @{ $aref }; # access the entire hash through its reference my $keys_count = keys %{ $href }; # get a single element through the array reference my $element = $aref->[0]; # get a single value through the hash reference my $value = $href->{ a }; # assign to a single array element through its reference $aref->[0] = 1; # assign a value to a single hash key through its ref $href->{ a } = 1;