I know this is too naive. I am sure some other smarter guys will make it into one liner.#!/usr/bin/perl use Data::Dumper; $var = [ { x => 1 }, { y => 2 }, { z => 3 } ]; my %res; foreach my $v (@{$var}) { my ($k) = keys %$v; $res{$k} = $v->{$k}; } print Dumper \%res;
In reply to Re: How do I return a hash from Parse::RecDescent?
by monkfan
in thread How do I return a hash from Parse::RecDescent?
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |