Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. my $line = shift;
  2. my $tamanho = shift;
  3.  
  4. my $nline = NFD($line);
  5. $nline =~ s/[^[:print:]+]//g;
  6. $nline =~ s/[x7F-xFF]+//g;
  7. $nline =~ s/([^[:ascii:]]+)/unidecode($1)/ge;
  8. $nline =~ s/[x00]//g;
  9. $nline =~ s/^s+|s+$//g;
  10. $nline .= (" " x ($tamanho - length($nline)));
  11. $line =~ s/^s+|s+$//g;
  12. $line .= (" " x ($tamanho - length($line)));
  13. if ($line ne $nline) {
  14. print "n$.n";
  15. print "ERA ==> $linen";
  16. print "NOV ==> $nlinen";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement