in reply to Re^4: Problem combining hashes
in thread Problem combining hashes

This works also.
my %all_keys; %all_keys->@{keys %A, keys %Z} = ();
deparser says
my %all_keys; @all_keys{keys %A, keys %Z} = ();
So it doesn't seem to be requiring a hash reference in that context.