Help for this page

Select Code to Download


  1. or download this
    open(my $fh, '<:encoding(UTF-8)', $language_qfn) or die;
    while (<$fh>) {
       ...
    }
    
  2. or download this
    binmode(STDIN, ':encoding(UTF-8)');
    while (<STDIN>) {
       ...
    }
    
  3. or download this
    use Encode qw( decode );
    
    ...
       $_ = decode('UTF-8', $_);
       ...
    }
    
  4. or download this
    open(my $fh, '>:encoding(UTF-8)', $output_fqn) or die;
    print $fh ($text);
    
  5. or download this
    binmode(STDOUT, ':encoding(UTF-8)');
    print($text);
    
  6. or download this
    use Encode qw( encode );
    open(my $fh, '>', $output_fqn) or die;
    print $fh (encode('UTF-8', $text));