Help for this page

Select Code to Download


  1. or download this
    open (ORDERFILE, '<:encoding(UTF-8)', $emailfile) or return (@err, "Co
    +uld not open order email file: $emailfile");
    my(@LINES) = <ORDERFILE>;
    ...
    use Encode;
    eval { my $utf8 = decode("utf8", $filedata, Encode::FB_CROAK ) };
    return(@err, "File was not encoded in UTF-8") if ($@);