Syntactic Confectionery Delight | |
PerlMonks |
array to hashby sunil9009 (Acolyte) |
on Oct 20, 2014 at 11:06 UTC ( [id://1104416]=perlquestion: print w/replies, xml ) | Need Help?? |
sunil9009 has asked for the wisdom of the Perl Monks concerning the following question:
How can I convert: my $items = [{'a' => 1},{'b' => 2},{'c' => 3}]; to my $values = {{'a' => 1},{'b' => 2},{'c' => 3}}; tried something like my $values = map {$_ => $_->{$_}} keys $_ map $_, @{$items}; and gave up
Back to
Seekers of Perl Wisdom
|
|