in reply to Sorting An Array of Versions
The idea is to create an array-reference, the first element is the thing and the second element is how you're going to sort. Sort the thing, then reconvert it back to the original. :-)@version = map { $_->[0] } sort { $a->[1][0] <=> $b->[1][0] || $a->[1][1] <=> $b->[1][1] || $a->[1][2] <=> $b->[1][2] } map { [ $_, [ split '.', $_ ] ] } @versions;
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|