It's not system-specific. I can replicate your results in Windows.
>perl -l -CDS -e "print qq{\x{101}}"
[funky chars]
>perl -CDS test-noCDS.pl
[funky chars]
>perl test-withCDS.pl
Wide character in print at test-withCDS.pl line 2.
[funky chars]
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
Binary build 817 [257965] provided by ActiveState
Built Mar 20 2006 17:54:25
The fourth test has a different result, because it's the same as the third test in Windows.
>test-withCDS.pl
Wide character in print at test-withCDS.pl line 2.
[funky chars]
Could it be related to the script starting execution before the -CDS switch is encountered? In other words, maybe STDIN, STDOUT, STDERR have already been created by the time shebang -CDS is encountered.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|