T
Tomasz Chmielewski
Let's say I have an array consisting of:
some-name-10
some-name-9
some-name-102
some-name-89
I would like to sort it the "human way", with the result:
some-name-9
some-name-10
some-name-89
some-name-102
What would be the suggested way to do it?
I would use 'split', but "some-name" is not static, and can be
"some-other-name" or just "name" a task later.
For the same reason, using 'substr' won't work.
Unless I write a subroutine to it.
What do you guys use to sort such things?
some-name-10
some-name-9
some-name-102
some-name-89
I would like to sort it the "human way", with the result:
some-name-9
some-name-10
some-name-89
some-name-102
What would be the suggested way to do it?
I would use 'split', but "some-name" is not static, and can be
"some-other-name" or just "name" a task later.
For the same reason, using 'substr' won't work.
Unless I write a subroutine to it.
What do you guys use to sort such things?