open(MAP, "> ucs_isdigit.map"); print MAP <) { chop; ($name, $class) = split; @cp = (); open(UCD, "< private/UnicodeData-4.1.0.txt"); while() { chop; @entry = split(';'); last if $entry[0] =~ m/.{5,}/; if ($entry[2] eq $class) { push (@cp, $entry[0]); } } close UCD; @bs = (); $last = -1; $seq = -1; for my $e (@cp) { if (++$last != hex $e) { $seq = $e; $last = hex $e; push (@bs, $seq); } $end{$seq} = $e; } $nobs = @bs; print MAP <