in reply to Sorting An Array of Versions

Never mind, this doesn't actually work. it was just a fluke of the small data set I tried it against...

Though I have to supress 'is not numeric' warnings, a simple numeric sort seems to produce the order you want....

#!/usr/bin/perl -wT use strict; my @versions=qw(2.0.0 1.0.9 1.0.10 1.1.0 1.1.2 1.0.90); my @sorted = do {no warnings 'numeric'; sort {$a <=> $b} @versions }; print "$_\n" for @sorted; __END__ 1.0.9 1.0.10 1.0.90 1.1.0 1.1.2 2.0.0

-Blake