Thread Array of Hash nach Hashvalue sortieren (12 answers)
Opened by jemand at 2005-11-20 11:56

renee
 2005-11-20 12:20
#60255 #60255
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
my @array = ({foo => 'erde',
bar => 'himmel'
},
{foo => 'wasser',
bar => 'luft'
},
{foo => 'blubb',
bar => 'bla'
}
);

my @sorted = sort{$a->{foo} cmp $b->{foo}}@array;
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Array of Hash nach Hashvalue sortieren