Thread Array sortieren (speziell) (5 answers)
Opened by wickedjack at 2006-11-01 20:36

pq
 2006-11-01 21:14
#71298 #71298
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
ich wuerde split nehmen:
Code: (dl )
1
2
3
@sorted = map  { $_->[0] }
sort { $a->[1] <=> $b->[1] }
map { [ $_, ( (split /-/)[2]) ] } @data;
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Array sortieren (speziell)