Thread Array umsortieren (6 answers)
Opened by EagleFox at 2006-07-18 16:23

styx-cc
 2006-07-18 16:49
#68213 #68213
User since
2006-05-20
533 Artikel
BenutzerIn

user image
Hoi,

Code: (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl -w
use strict;

my @array = ("1 a 10 100",
"2 b 20 200",
"3 c 30 300",
"4 d 40 400");
print join("\n", reverse(@array) );

Ausgabe:
Code: (dl )
1
2
3
4
5
stefan@workaholic:~/programmierung/perl/community$ perl sort.pl
4 d 40 400
3 c 30 300
2 b 20 200
1 a 10 100
Pörl.

View full thread Array umsortieren