in reply to Genesis of a sort routine

Interesting post, thanks for including the emergence as well as the finished product. My first thought was rather different: I'd partition the data, and recombine the results of simple separate sorts:

# simple and effective: @sorted = (sort(grep!/:/,@data), sort(grep/:/,@data)); # or to avoid grepping @data twice: (probably not much gain) my (@colo, @noco); /:/ ? push @colo, $_ : push @noco, $_ for @data; @sorted = (sort(@noco), sort(@colo));