diff --git a/usr.bin/sgmlfmt/sgmlfmt.pl b/usr.bin/sgmlfmt/sgmlfmt.pl index 29500ce06bf2..de6b1f390117 100755 --- a/usr.bin/sgmlfmt/sgmlfmt.pl +++ b/usr.bin/sgmlfmt/sgmlfmt.pl @@ -88,7 +88,7 @@ sub getfile { } $fileroot = $file; $fileroot =~ s/.*\///; # drop the path - $fileroot =~ s/\.sgml$//; # drop the .sgml + $fileroot =~ s/\.[^\.]*$//; # drop the extension $filepath = $file; $filepath =~ s/\/*[^\/]*$//; if ($filepath ne "") {