Consider the following:
$ perl -wle '@t = qw(some stuff); print chop(@t)'
f
$ perl -wle '@t = qw(some stuff); print chop(@t[0..1])'
e
$ perl -wle '$t1 = "some"; $t2 = "stuff"; print chop($t1, $t2)'
e
This shows up in 5.005_03, 5.6.0 and 5.7.0. Now, the docs for chop()
say "If you chop a list, each element is chopped. Only the value of
the last `chop' is returned.". I should get 'f' in both cases, but
I'm sure some language laywer is going to tell me why I'm not.
Is there some sort of obscure reason why this is so, or is it a bug?
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
The eye opening delightful morning taste of expired cheese bits in sour milk!