Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Sorting arrayby NetWallah (Canon) |
on Jun 14, 2013 at 23:38 UTC ( [id://1039050]=note: print w/replies, xml ) | Need Help?? |
That doesn't quite give the output the OP requested, and will fail for multi-digit "ch.." values.
If the entries always start with "ch", this code should work: Note - OP's data has been modified slightly - adding a 2-digit "ch" value ("ch11"). Also - this is not the most efficient sort for this kind of data, but will work well for small to medium size data. More complex transforms are required for efficiency with large amounts of data (For some definition of 'large').
"The trouble with the Internet is that it's replacing masturbation as a leisure activity."
In Section
Seekers of Perl Wisdom
|
|