http://qs321.pair.com?node_id=569165


in reply to Re: Should perl implement ,= or maybe overload .= (array context)
in thread Should perl implement ,= or maybe overload .= (array context)

I agree fully with the example on '+', and '.' operators and that's why I thought ,= was more consistent with perl philosophy; but favoring a function'al approach rather than an operator approach for arrays seems more consistent with PHP a la array_new. As a side note though the analogy doesn't hold entirely true, perl -e'print "4 foo"+"1"' will demonstrate a purpose for +'ing two strings.

I like '.=' more because it is clear what it should do in either context, and i don't really see a need for a ',='. Either operator would have a lower level of precedence too.



Evan Carroll
www.EvanCarroll.com