This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
charnames.t: Guard agains empty lines in __DATA__
[perl5.git] / lib / charnames.t
index a77fec2..f41d5a3 100644 (file)
@@ -850,6 +850,7 @@ is("\N{U+1D0C5}", "\N{BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS}");
     # from the web.
     while (<DATA>) {
         chomp;
+        next unless $_;     # Guard against empty lines getting inserted.
         my ($code, $name) = split ";";
         my $decimal = hex $code;
         $names[$decimal] = $name;