On Sat Jan 07 05:30:12 2012, LeonT wrote: > On Sat, Jan 7, 2012 at 3:57 AM, James E Keenan via RT > <perlbug-followup@perl.org> wrote: > > Confirmed. �Do you know why that null byte is overwriting the 'B'? > > When $string is overwritten, the nullbyte is written but the buffer is > kept at its existing size. :scalar ignores the new length and appends > to the end, setting the length to what it things it should be. > > Try undefining $scalar or make it an array if you want some really > weird results. The bottom line is that :scalar makes the assumption > that no one else will change $string, and that is not a reasonable > assumption. I wouldn't be surprised if there was a way to make this > segfault. Setting the scalar to a number caused a segfault before I fixed it in commit c5a04db879f4. The bug in this ticket was fixed as a side-effect of fixing #92706 in commit b65972750. The funny thing is that your comment came along just two days after those fixes. -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=78980