@array = map { $_->[0] } sort { $a->[3] <=> $b->[3] || $a->[2] <=> $b->[2] || $a->[1] <=> $b->[1] } map { [$_, split /\./] } @array;