@x = sort {$a =~/^d+/ <=> $b =~/^d+/} @x; print "regex sort: @x\n";