In list context, this sorts the LIST and returns the sorted list value. In scalar context, the behaviour of sort is undefined.