in reply to regex: searching for multi-byte characters
The code to check for what you want to tally might look like this:while (<FILE) { while ($_ =~ /\G(.)/g) { my $char = $1; # code here to check whether $char is one you want to tally... } }
my $u = unpack('U', $char); $tally{$char}++ if ($u > 128);
|
|---|