in reply to hashes of arrays

try this:
foreach (@file) { open(FILE,"$_"); @{$hash{$_}{file_contents}} = <FILE>; close(FILE) }
note that $hash{$_}{file_contents} contains a _reference_ to an array, not an array.