use strict; use warnings; my @zeilen = ; my @sortiert = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, /^(\d+)/ ] } @zeilen; print for @sortiert; =pod ergibt als Ausgabe: 7744 OUT 2014-04-01 00:03:00 75 3375504915 X national 3413552992 7744 OUT 2014-04-01 00:05:00 15 3375504915 X international 3413552992 7749 OUT 2014-03-31 23:28:00 2235 3375504090 X national 2513238104 9041 OUT 2014-03-31 23:33:00 2323 33785239951 X national 3099196476 201749 OUT 2014-04-01 00:00:00 30 38362758258 X unkown 2758259 202261 OUT 2014-03-31 23:45:00 1027 33764785002 X national 303945793 204079 OUT 2014-04-01 00:13:00 0 33678999952 X international 22090506432 204079 OUT 2014-04-01 00:13:00 0 33678999952 X international 22090506432 204079 OUT 2014-04-01 00:14:00 37 33678999952 X international 35228489070 =cut __DATA__ 201749 OUT 2014-04-01 00:00:00 30 38362758258 X unkown 2758259 202261 OUT 2014-03-31 23:45:00 1027 33764785002 X national 303945793 7744 OUT 2014-04-01 00:03:00 75 3375504915 X national 3413552992 7749 OUT 2014-03-31 23:28:00 2235 3375504090 X national 2513238104 7744 OUT 2014-04-01 00:05:00 15 3375504915 X international 3413552992 9041 OUT 2014-03-31 23:33:00 2323 33785239951 X national 3099196476 204079 OUT 2014-04-01 00:13:00 0 33678999952 X international 22090506432 204079 OUT 2014-04-01 00:13:00 0 33678999952 X international 22090506432 204079 OUT 2014-04-01 00:14:00 37 33678999952 X international 35228489070