Leser: 23
1
2
3
4
5
6
7
8
http://foo.bar/Aufbruch/Gegen-die-Diktatur/01-Dissidenten-in-Europa_de.htm
http://foo.bar/Aufbruch/Gegen-die-Diktatur/02-Test_de.htm
http://foo.bar/Aufbruch/Gegen-die-Diktatur/index_de.htm
http://foo.bar/Aufbruch/Index_de.htm
http://foo.bar/Aufbruch/Jugend/01-Dieses-Land-Ist-es-nicht_de.htm
http://foo.bar/Aufbruch/Subkultur/Artikel01_de.htm
http://foo.bar/Aufbruch/Subkultur/Index_de.htm
http://foo.bar/Aufbruch/Subkultur/TestGalerie_de.htm
1
2
3
4
5
6
7
8
http://foo.bar/Aufbruch/Index_de.htm
http://foo.bar/Aufbruch/Gegen-die-Diktatur/index_de.htm
http://foo.bar/Aufbruch/Gegen-die-Diktatur/01-Dissidenten-in-Europa_de.htm
http://foo.bar/Aufbruch/Gegen-die-Diktatur/02-Test_de.htm
http://foo.bar/Aufbruch/Jugend/01-Dieses-Land-Ist-es-nicht_de.htm
http://foo.bar/Aufbruch/Subkultur/Index_de.htm
http://foo.bar/Aufbruch/Subkultur/Artikel01_de.htm
http://foo.bar/Aufbruch/Subkultur/TestGalerie_de.htm
my @files = sort { if ($a =~/Index/gi) { return -1; } elsif ($b =~/Index/gi) { return 1; } else { return $a cmp $b; } } @unsortedfiles;
1 2 3 4 5 6 7 8
my @sorted = map { $_->[1] } sort { $a->[0] cmp $b->[0] } map { my $index = m{(.*)/index_de.htm$}i ? $1 : $_; [$index, $_] } @list;
2009-04-22T17:58:37 cbxk1xgHallo Freunde der Sonne,
1 2 3 4 5 6 7 8 9 10 11 12
my @list=qw(http://foo.bar/Aufbruch/Gegen-die-Diktatur/01-Dissidenten-in-Europa_de.htm http://foo.bar/Aufbruch/Gegen-die-Diktatur/02-Test_de.htm http://foo.bar/Aufbruch/Gegen-die-Diktatur/index_de.htm http://foo.bar/Aufbruch/Index_de.htm http://foo.bar/Aufbruch/Jugend/01-Dieses-Land-Ist-es-nicht_de.htm http://foo.bar/Aufbruch/Subkultur/Artikel01_de.htm http://foo.bar/Aufbruch/Subkultur/Index_de.htm http://foo.bar/Aufbruch/Subkultur/TestGalerie_de.htm); @list=map{ s!/\0\0\0__([^/]+?)$!/$1!i; $_ } sort map{ s!/(index.*?\.htm.*?)$!/\0\0\0__$1!i; $_ }@list; print join("\n",@list)."\n";