in reply to Re: Re: ttchop()/tt and list assignments
in thread chop() and list assignments

No one has addressed the problem. Here is debugger code:
DB<8> x chop(@a = ('abc','def','ghi')) 0 'c' DB<9> @a = qw( abc def ghi ) DB<10> x chop(@a) 0 'i'
This feels so very wrong. What is that list assignment doing to chop()? Is it, for some reason, returning the last element assigned? All of the elements in the array are modified. Yet there are different return values. This is ungood.

This occurs in 5.6.0. And it happens in bleadperl. This is a bug. It feels so bad.

japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
(tye)Re: chop() and list assignments
by tye (Sage) on Mar 06, 2001 at 10:52 UTC

    This same behavior exists in 5.004. Notice a similar "problem" with chop( @a[0..2] ).

    It certainly seems like a bug but, I have to say, I can't get too worked up about it as being a serious bug. But a bug report is in order.

            - tye (but my friends call me "Tye")