我正在用这段代码来分析Java并在Java上做同样的事情。 我已经在网上搜索该代码的作用,但我不知道。
有人可以帮助我吗?
my $line = shift;
my $tamanho = shift;
my $nline = NFD($line);
$nline =~ s/[^[:print:]+]//g;
$nline =~ s/[\x7F-\xFF]+//g;
$nline =~ s/([^[:ascii:]]+)/unidecode($1)/ge;
$nline =~ s/[\x00]//g;
$nline =~ s/^\s+|\s+$//g;
$nline .= (" " x ($tamanho - length($nline)));
$line =~ s/^\s+|\s+$//g;
$line .= (" " x ($tamanho - length($line)));
if ($line ne $nline) {
print "\n$.\n";
print "ERA ==> $line\n";
print "NOV ==> $nline\n";
}
感谢和问候!