![]() |
perl-unicode
|
tr///d does not seem to work1998-10-14 13:32:14use utf8;
$_ = "abc...\x{e6}\x{f8}\x{e5}";
tr/\x{7F}-\x{FF}//d;
print "not " unless $_ eq "abc...";
print "ok 6\n";
print udump($_), "\n";
sub udump
{
my $str = shift;
$str =~ s/\\/\\\\/g;
$str =~ s/([^\040-\176])/sprintf "\\x{%04x}", ord($1)/ge;
$str;
}
|
|
||||||||||||||||