Question: I'm sending a subroutine a hash, and fetching it with `my($arg_ref) = @_;`

But what exactly is `%$arg_ref`? Is `%$` dereferencing the hash?

Answer: 
```
my %hash = ( fred => 'wilma',
             barney => 'betty');
my $hashref = \%hash;
my $freds_wife = $hashref->{fred};
my %hash_copy = %$hash # or %{$hash} as noted above.

```

Soo, what's the point of the syntax flexibility? Let's try this:

```
my %flintstones = ( fred => { wife => 'wilma',
                              kids => ['pebbles'],
                              pets => ['dino'],
                            }
                    barney => { # etc ... }
                  );

```

Actually for deep data structures like this it's often more convenient to start with a ref:

```
my $flintstones = { fred => { wife => 'Wilma',
                               kids => ['Pebbles'],
                               pets => ['Dino'],
                              },
                   };

```

OK, so fred gets a new pet, 'Velociraptor'

```
push @{$flintstones->{fred}->{pets}}, 'Velociraptor';

```

How many pets does Fred have?

scalar @ {flintstones->{fred}->{pets} }

Let's feed them ...

```
for my $pet ( @ {flintstones->{fred}->{pets} } ) {
    feed($pet)
}

```

and so on. The curly-bracket soup can look a bit daunting at first, but it becomes quite easy to deal with them in the end, so long as you're consistent in the way that you deal with them.
Since it's somewhat clear this construct is being used to provide a hash reference as a list of named arguments to a sub it should also be noted that this

```
sub foo {
  my ($arg_ref) = @_;
  # do something with $arg_ref->{keys}
}

```

may be overkill as opposed to just unpacking @\_

```
sub bar {
  my ($a, $b, $c) = @_;
  return $c / ( $a * $b );
}

```

Depending on how complex the argument list is.