jjohhn has asked for the wisdom of the Perl Monks concerning the following question:
My data has a maximum character length of 3 bytes, but I might not have known that. How do I grab at the entire character, so I can put it into a hash tallying the number of times it appears? The camel says "regular expressions match characters instead of bytes". The man pages on pack() and unpack() say something clearly important that I am unable to comprehend at my stage. Can somebody either hint at the next step in my code, or direct me to documentation that would help? Thank youwhile (<FILE>){ if(/[\xc0-\xfd]/)#found lead byte of a multibyte sequence
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex: searching for multi-byte characters
by blahblahblah (Priest) on Mar 01, 2003 at 05:04 UTC |