Useless use of integer addition in void context at - line 1. For functions that can be used in either a scalar or list context, nonabortive failure is generally indicated in a scalar context by returning the undefined value, and in a list context by returning the null list. It might do two totally different things. Each operator and function decides which sort of value it would be most appropriate to return in a scalar context. Some operators return the length of the list that would have been returned in list context.
Some operators return the first value in the list.
Some operators return the last value in the list. Some operators return a count of successful operations. In general, they do what you want, unless you want consistency. An named array in scalar context is quite different from what would at first glance appear to be a list in scalar context. It would generate the scalar comma operator there, not the list construction version of the comma.