in reply to array to hash

Hi,

you need always a key-value-pair for a hash. So, what is the key in

{{'a' => 1},{'b' => 2},{'c' => 3}};

UPDATE: Or do you mean:

{'a' => 1,'b' => 2,'c' => 3};

UPDATE2: In that case it could be something like:

my $items = [{'a' => 1}, {'b' => 2}, {'c' => 3}]; my $values = {map { %$_ } @$items};

Regards
McA