in reply to Unique keys for multiple values with a Hash

The sigil for hash is %hash. &hash is an error.

Since a hash value must be a scalar, you need to make them array references.

while (<DATA>) { my ($key, $val) = split; push @{$hash{$key}}, $val; }
See tye's References quick reference.

After Compline,
Zaxo