I know no-one in their right mind would want to do this, but...
The code below produces an unexpected (for me) result. The first call
to read_script() reports 23 codepoint ranges. The second reports 0.
Regards,
Terry.
----------------------------------------------------------------------
#!/usr/bin/perl -w
use Unicode::UCD 'charscript';
sub read_script {
my $script = shift;
my $ranges = charscript($script);
printf "Read script $script. %d ranges exist.\n", scalar(@$ranges);
while (my $range = shift @$ranges){
printf "%06X -> %06X\n", $$range[0], $$range[1];
}
}
read_script('Latin');
read_script('Latin');