in reply to sorting an array
map {'ch'.(0+$_)} sort map {sprintf "%.10u", /(\d+)/} @array;
just for the sake of using a technique of Advanced Sorting - GRT - Guttman Rosler Transform, i.e. make a map sort map but with a bare/string sort.
Of course, a pack 'N' would be preferable over the sprintf.
In Section
Seekers of Perl Wisdom