print thought given reference to a hash

D

Dan Jacobson

This looks good:
use Unicode::UCD 'charinfo';
my $charinfo = charinfo(0x41);
charinfo() returns a reference to a hash that has the following fields
as defined by the Unicode standard:
key
code code point with at least four hexdigits
name name of the character IN UPPER CASE
category general category of the character...
But how can I print the whole thing out? I looked in perlref and
Tie::RefHash but I'm not as sharp as I used to be.

You see I want to find evidence that U+4EB0 is more Japanese, and
U+4EAC is more Chinese versions of the same character, and maybe the
above charinfo structure would say so, but I don't know how to print it.
(iconv -t gb2312 supports my conjecture, as only one is mapped...)
 
J

John Bokma

Dan Jacobson said:
This looks good:
use Unicode::UCD 'charinfo';
my $charinfo = charinfo(0x41);
charinfo() returns a reference to a hash that has the following
fields as defined by the Unicode standard:
key
code code point with at least four hexdigits
name name of the character IN UPPER CASE
category general category of the character...
But how can I print the whole thing out? I looked in perlref and
Tie::RefHash but I'm not as sharp as I used to be.

use Data::Dumper;

print Dumper $charinfo;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top