2 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[
{
type => 'foo',
date => '2008-12-23',
count => 1234
},
{
type => 'baz',
date => '2008-12-24',
count => 1234
},
{
type => 'bar',
date => '2008-12-23',
count => 1234
},
{
type => 'foo',
date => '2008-12-24',
count => 1234
},
{
type => 'bar',
date => '2008-12-24',
count => 1234
}
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
foo => [
{
date => '2008-12-23',
count => 1234
},
{
date => '2008-12-24',
count => 1234
}
],
bar => [
{
date => '2008-12-23',
count => 1234
},
{
date => '2008-12-24',
count => 1234
}
],
baz => [
{
date => '2008-12-24',
count => 1234
}
]
1 2 3 4 5 6 7 8 9
my %data_hash = map { my %tmphash = ( count => $_->{'count'}, date => $_->{'date'} ); $_->{'type'} => push($_->{'type'},\%tmphash); } @{$sql_output_ref};
1 2 3 4 5 6
my %data_hash; for my $element ( @array ){ my $type = delete $element->{type}; my %tmp = %$element; push @{ $data_hash{$type} }, \%tmp; }
2 Einträge, 1 Seite |