+sub compareLOGName
+{
+ #my($a, $b) = @_;
+
+ my $na = $1 if ( $a =~ /LOG\.(\d+)/ );
+ my $nb = $1 if ( $b =~ /LOG\.(\d+)/ );
+
+ if ( length($na) >= 5 && length($nb) >= 5 ) {
+ #
+ # Both new style. Bigger numbers are more recent.
+ #
+ return $nb <=> $na;
+ } elsif ( length($na) >= 5 && length($nb) < 5 ) {
+ return -1;
+ } elsif ( length($na) < 5 && length($nb) >= 5 ) {
+ return 1;
+ } else {
+ #
+ # Both old style. Smaller numbers are more recent.
+ #
+ return $na - $nb;
+ }
+}
+
+