Are you implying that I broke that code accidentally? ;)Why would you break anything on purpose, and not mention that you did? That's a terrible waste of other people's time.
Juerd, I'm trying to keep things friendly, here. It's my style to fight fire with water. Hence the smiley and the oblique remark as a response to some rather nasty comments, even though something stronger might have been warranted.
The code in the OP is "broken" in the sense that it triggers a warning. That was intentional. It's broken -- on purpose -- because the whole point of that snippet is to trigger the warning.
You would also argue that it is broken because of the way that I constructed the example scalars. For me, how those scalars were constructed is a peripheral issue. For you that issue appears to be central. My code works fine as it is, and so I disagree: it is not "broken" in the way you assert. Nevertheless, in the future, I will adopt the pack technique you advocate for constructing binary strings, and I thank you and demerphq for bringing it to my attention.
In the meantime, I would appreciate it if we could lower the temperature of this discussion. Nobody's perfect. You are obviously quite knowledgeable about Unicode and Perl (as I knew when I cited your tutorial), yet you have said things in this thread which are demonstrably wrong[1], and in the very post where you scold me for not knowing what the heck my broken code does. We're all here to learn, and I'm grateful for your more thoughtful posts. Hopefully we can continue to learn from each other in the future.
[1] "No, we see the warning because you're printing something that has the UTF8 flag set (and thus with certainty is a text string), to a filehandle that doesn't have an encoding attached to it." If that were true, then this code would issue a warning:
#!/usr/bin/perl use strict; use warnings; use Devel::Peek; use charnames ':full'; my $thorn = "\N{LATIN CAPITAL LETTER THORN}"; Dump $thorn; print $thorn; print "\n";
In reply to Re^6: Interventionist Unicode Behaviors
by creamygoodness
in thread Interventionist Unicode Behaviors
by creamygoodness
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |