in reply to sorting an array

map {"ch$_"} sort {$a <=> $b} map {/(\d+)/} @array
should do.