>I read your message and agree. Not that I liked the idea that much even
>before considering the ramifications. But do you agree that even
>seasoned perlers have trouble anticipating how a list/array is going to
>be converted to a scalar?

A list or array?  No, I don't agree.  How to predict what an arbitrary
function will behave in list context?  Sure, that one I'll buy for buck.

>I'd vote for no C<list> operator, but for adding a count operator and a
>last element operator. I suggest ()= for the first and C<peek> for the
>second. 

Or as Graham shows, "=()=" is the list-counting assignment operator. :-)

What's wrong with (...)[-1] for the last element and (...)[0] for
the first one?  But as I showed, these can surely be nastily inefficient
for really big lists.

--tom

Reply via email to