my @unsorted = ; my @sorted = sort { (my $first) = $a =~ m/chr(.+)/; (my $second) = $b =~ m/chr(.+)/; #### hier muss etwas hin } @unsorted;