my @sorted=@unsrt[ map +(split /:/)[-1], sort map func($unsrt[$_]) . ":$_", 0 .. $#unsrt ];