in reply to Re: Identifying scripts (writing systems)
in thread Identifying scripts (writing systems)
Ah, I had a hunch there would be another solution, one that I'd overlooked! Indeed, you're right, the following also works (and is faster to boot):
use Unicode::UCD qw/charscript/; # ... my %scripts; $scripts{charscript ord substr $_, 0, 1}++ foreach (@lines);
And it appears that Unicode::UCD was added to the Perl core in 5.8, so I can't even claim victory on that front... on the other hand, I enjoyed working on this, so although I could've saved my time, I didn't strictly waste it. :)
|
---|