in reply to Unexpected interaction between decode_entities() and lc()

Update: removing the -w flag from your shebang line fixes the problem.

I cannot say what the issue is that is triggered by it, but in general you should not use -w in your program as it turns on all warnings in all code pulled into it. To limit to your own code, use use warnings; instead.

Hope this helps!

Orignal reply below:

Hi, I can't reproduce your results on my system.

$ perl 1203368.pl édition limitée. édition limitée.
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-li +nux


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: Unexpected interaction between decode_entities() and lc()
by kurisuto (Novice) on Nov 14, 2017 at 13:44 UTC

    I tried removing -w just now, and got the same output:

    édition limitée.
    Édition limitée.

    I'm not sure why -w would affect the behavior of decode_entities() or lc() (other than maybe printing warnings). I wasn't getting any warnings one way or the other; just unexpected output.

      I'm not sure either. But strange things like that do happen.

      More info: What's wrong with -w and $^W from the Perl documentation.


      The way forward always starts with a minimal test.