in reply to "Looking" at the characters of a Unicode string.
Nice. I modified my copy to display the letter, and reversed
the print string so that the long text of the unicode name didn't muck up the tab columns.
I'm not really a human, but I play one on earth. flash japh
#!/usr/bin/perl use warnings; use strict; use Unicode::CharName qw/uname/; use Unicode::UCD qw/charinfo/; my $value = shift || "Å være eller å ikke være"; my $c; print "HexValue:\tCharCode\tUnicode Charname:\n"; for (split //, $value) { my $l = $_; $c = ord($_); print charinfo($c)->{code} . ":\t\t$c\t\t"."$l -> ". uname($c) ."\n"; }
I'm not really a human, but I play one on earth. flash japh
|
---|
In Section
Cool Uses for Perl