in reply to Unicode Kanji Table?

Do you mean that you want to "do something" with each utf8-encoded character in the range from U4E00 to U9FAF?

Yes, you can use numbers expressed in hex to control your loop:

for ( 0x4e00 .. 0x9faf ) { my $char = chr($_); # do something with $char... }
(update: cleaned up first paragraph)

Replies are listed 'Best First'.
Re^2: Unicode Kanji Table?
by GaijinPunch (Pilgrim) on Jun 28, 2005 at 05:17 UTC
    Yes, I went with something along those lines, graff. I didn't know Perl could loop through HEX numbers so easily. That's what I get for thinking

    There's a lot of online kanji databases, but they URL always seems to be based on each character's unicode value... so I needed these to cycle through each URL and suck the data into my own databse (making flashcards... like what halley was up to I'm sure). :)

    Thanks guys.
    GP
      I didn't know Perl could loop through HEX numbers so easily.

      Numbers are numbers. You can express them as hex or octal or decimal; the interpreter just remembers the native format for that number. The interpreter usually doesn't even remember what format you used.

      U:\> perl -MO=Deparse -e "print 0x1234" print 4660; -e syntax OK

      --
      [ e d @ h a l l e y . c c ]