Is it safe to say
use Unicode::Digits qw/digits_to_int/;
my @digits;
for (split "\n", require "unicore/lib/gc_sc/Digit.pl") {
my ($s, $e) = map hex, split;
for (my $ord = $s; $ord <= $e; $ord++) {
my $chr = chr $ord;
push @{$digits[digits_to_int $chr]}, $chr;
}
}
for my $i (0 .. 9) {
my $re = join '', "[", @{$digits[$i]}, "]";
$digits[$i] = qr/$re/;
}
Or is unicore/lib/gc_sc/Digit.pl an undocumented feature likely to change?
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
Thread Next