Hi Monks

This is going to be a somewhat vague question I'm afraid...

I have a script that reads some csv and outputs to a different format. Locally, I'm getting a an error when it outputs non-ascii UTF8 ("Wide character in print"), but not on site, even with the same data. Both locations are using Active State - 5.24 locally, and 5.16.2 on site.

In addition, to get a simple case, I wrote a short script that just reads the data and outputs it to a file, with no other processing. However, this doesn't throw an error either locally or on site.

use strict; use warnings; open(IN, '<', $ARGV[0]); open(OUT, '>', 'temp.txt'); while(<IN>){ print OUT; }

So, I guess my questions are:

1. What should I look for/check in terms of the local/site difference?
2. Why does the above script not give me the same error?

Apologies for the somewhat vague question - happy to supply more details if required - oh, and in the example I've been looking at, it was 'proper' single-quotes that were giving the error.

map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
Tom Melly, pm (at) cursingmaggot (stop) co (stop) uk

In reply to UTF8 - Same script, different behaviour by Melly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.