in reply to length() miscounting UTF8 characters?

The open pragma is documented to affect open() and similar ops within its lexical scope, but you aren't using open; you're using <> to read the already-opened magic ARGV filehandle.

Dave.

Replies are listed 'Best First'.
Re^2: length() miscounting UTF8 characters?
by choroba (Cardinal) on Apr 27, 2014 at 22:40 UTC
    My tests show that ARGV is affected if you call the script with a file name parameter, but it's not affected if you use it to read data from the standard input.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^2: length() miscounting UTF8 characters?
by AppleFritter (Vicar) on Apr 28, 2014 at 09:31 UTC

    Thank you for your reply, and good to know! This already came up a little further up; it turns out that there is a way to make the open pragma apply there as well, if you know the right magic incantation. :)