>I had implemented them as closures, but using those in your own >code turned out to be not so trivial. Probably a stupid question, but what's a closure? (just point me to pod or whatever.) > for my $c (0, 128 .. 255) { > $encode{chr $c} = UTF8::chr($c); > } ... > s/([\000\200-\377])/$encode{$1}/g; And I was just going to think this would be beyond simple character substitution. Silly me. I assume this will work the same in UTF-16 enabled Perl? Does Perl have a way to build a structure that would look in C like the following? (It defines the elements of a sort of sparse array.) typedef struct translationElement_s { short lookNextLevel; unsigned char value; struct translationElement_s * nextLevel; // next level translation array } translationElement_s; If so, is there a way to stuff such a table into an RE like the above? At any rate, I have been assuming that all the talk about Perl supporting UNICODE refers to UTF-16, and I am wondering if anyone here knows what kind of preparation is in the works for taking Perl beyond UTF-16. Perhaps I should post this question to another list? Joel Rees ---------------------------------------- Keeping the Faith <joel_rees@sannet.ne.jp> <http://www.page.sannet.ne.jp/joel_rees> (free account:) <reiisi@nettaxi.com> <http://www.nettaxi.com/citizens/reiisi> ---------------------------------------- # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org