Challenge 3: A Hash of Arrays — Possible Solution ==================================================================== use strict; use warnings; use feature 'say'; my %departments = ( Engineering => ["Ada", "Grace", "Alan"], Marketing => ["Bob", "Carol"], ); foreach my $name (@{ $departments{Engineering} }) { say $name; } Output: Ada Grace Alan WHY THIS WORKS AS AN ANSWER ------------------------------ ["Ada", "Grace", "Alan"] and ["Bob", "Carol"] both reuse the chapter's own anonymous-array-reference syntax exactly — square brackets build a new array reference directly inline, with no separately-declared @array variable needed for each department, matching the chapter's own %teams example structure precisely, just with department names and employees instead of team colors and players. %departments is a plain hash (Chapter 4) whose values are each one of those array references — the chapter's own "hash of arrays" shape. $departments{Engineering} retrieves the array reference stored under the "Engineering" key, reusing ordinary hash-value lookup from Chapter 4. Wrapping it as @{ $departments{Engineering} } reuses the chapter's own classic dereference syntax (@{...}) to turn that reference back into the actual list of three names, which foreach can then iterate over directly — equivalently, this could also be written @{$departments{Engineering}} without the inner spaces, or even without an explicit dereference at all in some contexts, but the braced form here makes clear exactly what's being dereferenced and into what shape (a list, per the @ sigil), directly answering the challenge's request to print every employee in that one department.