in reply to Re: s/.// increases length - bug or badly documented feature
in thread s/.// increases length - bug or badly documented feature

Also interesting is that the deparsed code is not equal.
print length chr 12345
outputs "1", and deparses to:
print length "\343\200\271";
which outputs "3" :)

Between chr and ord, things are consistent: ord chr 12345 is 12345 (maybe it should return 12345 % 256?)

Lbh ebgngrq guvf grkg naq abj lbh pna ernq vg. Fb jung? :) -- Whreq

Replies are listed 'Best First'.
Re: Re: Re: s/.// increases length - bug or badly documented feature
by BrentDax (Hermit) on Mar 01, 2002 at 09:39 UTC
    >bleadperl -MO=Deparse -e "print length chr 12345" print length "\x{3039}"; -e syntax OK
    This apparently will be fixed in 5.8.0 (due out in May probably), and I imagine the change will be backported to 5.6.2 as well.

    =cut
    --Brent Dax
    There is no sig.