in reply to Slice of a hash of hashes

It looks like you're dereferencing things in the wrong order. Try this: @{ $values{$unique} }{@header} = @values; $values{$unique} is a hash reference; $values{$unique}{$header} is a single element from the referenced hash; and @{$values{$unique}}{@header} is a hash slice on the referenced hash.