diff --git a/fhem/contrib/commandref_modular.pl b/fhem/contrib/commandref_modular.pl
index f33891669..271d964f2 100644
--- a/fhem/contrib/commandref_modular.pl
+++ b/fhem/contrib/commandref_modular.pl
@@ -88,7 +88,7 @@ EOF
}
print OUT "
\n";
my $rc = "odd";
- for my $m (sort keys %modData) {
+ for my $m (sort {uc($a) cmp uc($b)} keys %modData) {
next if(!$modData{$m}{type} || $modData{$m}{type} ne $type);
my $d = $modData{$m}{"summary$sfx"};
if(!$d) {