my %by_fields; #while (my $row = $sth->fetchrow_hashref()) { foreach my $row (@ar) { foreach my $field (keys %$row) { my $value = $row->{$field}; push(@{$by_fields{$field}}, $value); } }
In reply to Re: Converting an array of hashrefs into a hashref of arrays
by ikegami
in thread Converting an array of hashrefs into a hashref of arrays
by santonegro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |