fork download
  1. #!/usr/bin/perl
  2.  
  3. use utf8;
  4.  
  5. use Encode qw(encode decode);
  6.  
  7. $s = "dæmi : пример : příklad : thí dụ";
  8.  
  9. $t = decode('ascii', encode('ascii', $s, sub { return '' } ));
  10.  
  11. print $t;
Success #stdin #stdout 0.04s 7420KB
stdin
Standard input is empty
stdout
dmi :  : pklad : th d