- or download this
my %scripts;
foreach (@lines) {
...
$scripts{$script}++;
}
- or download this
my %scripts;
LINE: foreach my $line (@lines) {
...
$scripts{'(unknown)'}++;
}
- or download this
my @known_scripts = (
"Arabic", "Armenian", "Avestan",
...
"Coptic", "Cuneiform", "Cypriot", "Cyrillic",
# ...
);
- or download this
Can't find Unicode property definition "Script=Chakma" at (...) line (
+...)
- or download this
$ for i in 8 10 12 14 16 18 20; do perl scripts.pl scripts-5$i.txt >5$
+i.lst; done
$ for i in 8 10 12 14 16 18; do diff --unchanged-line-format= --new-li
+ne-format=%L 5$i.lst 5$((i+2)).lst >5$((i+2)).new; done
$
- or download this
#!/usr/bin/perl
...
$, = "\n";
say sort { $a cmp $b } map { $_ = ucfirst lc; $_ =~ s/(?<=_)(.)/uc $1/
+ge; qq/"$_"/ } keys %scripts;
- or download this
# New Unicode scripts added in Perl 5.xx
my %uniscripts = (
...
}
print STDERR "Running on Perl $^V, ", scalar @known_scripts, " scripts
+ known.\n";
- or download this
# tentative!
'22' => [
...
"Old_Permic", "Pahawh_Hmong", "Palmyrene", "Pau_Cin_Hau",
"Psalter_Pahlavi", "Siddham", "Tirhuta", "Warang_Citi"
],
- or download this
print "Found " . scalar keys(%scripts) . " scripts:\n";
print "\t$_: " , $scripts{$_}, " line(s)\n" foreach(sort { $a cmp $b }
+ keys %scripts);
- or download this
Running on Perl v5.14.2, 95 scripts known.
Found 18 scripts:
...
Tamil: 4 line(s)
Telugu: 1 line(s)
Thai: 1 line(s)