in reply to Sorting An Array of Versions

This will work, assuming your version numbers and subnumbers don't exceed 1000. This is of course the famous Shwartzian Transform.
#!/usr/local/bin/perl use strict; my @versions=qw(2.0.0 1.0.9 1.0.10 1.1.0 1.1.2); my @sversions = map {$_->[0]} sort {$a->[1] <=> $b->[1]} map { my ($a1,$a2,$a3) = split(/\./,$_); [$_,$a1*1000000 + $a2*1000 + $a3] } @versions;


-pete
"I am Jack's utter lack of disbelief"