Help for this page

Select Code to Download


  1. or download this
    my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1 });
    #                              ~~~~~~~~~~~
    open my $fh, "<:encoding(utf8)", "test.csv" or die "test.csv: $!";
    #              ~~~~~~~~~~~~~~~
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my $structure = decode_json($encoded);
    binmode *STDOUT, ':encoding(UTF-8)';
    say $structure->{'yellow horse'};