in reply to Comparing/Completing Hashes

Almost a one-liner:
my %h; @h{keys %$_} = values %$_ for @data;
But, I'd rather not use it, because it does not check for a missing name, several different values for a value etc. But I will keep the sophisticated version secret to let you devise it yourself.

Replies are listed 'Best First'.
Re^2: Comparing/Completing Hashes
by AnomalousMonk (Archbishop) on Aug 13, 2010 at 23:55 UTC
    [I]t does not check for ... several different values for a [key] ...

    ... or for identical values for the same key in different anonymous hashes when those values are the empty string, as most values are in the example data.

      Covered by "etc" ;)
Re^2: Comparing/Completing Hashes
by jjw92 (Novice) on Aug 14, 2010 at 00:02 UTC

    When trying that, it only works for storing the last hash. If I knew more about what it was doing, maybe it is just a formatting issue? I'm not sure..

      As AnomalousMonk noted, you would have to avoid setting the empty values. But as I noted, you should rather not use this approach.