I have to process a YAML document: 

```
sheet : filename.exe

book : bookname

characters :

   - amy : mother

   - mark : father

   - dave : son

```

Now I have the following code where I want to iterate and save the "character" in a hash to use later:

```
use YAML qw(LoadFile);
my $config = LoadFile('config.yaml');
my %charlist = ();
foreach my $key (keys %$config){
  next if ($key ne "character");
  foreach my $list (keys %{$config{$key}}){
    my $current_character = $config{$key}{$list};
    $charlist->{$list} = $current_character;
  }
}

```

I'm trying to store it into a hash like this:

```
{ amy => mother,
  mark => father,
  dave => son
}

```

I'm not able to go into the second foreach loop. I'm not able to understand the issue.