in reply to
Re: Re: Re: Re: Re: What should be returned in scalar context? (best practice)
in thread What should be returned in scalar context?
"returns an array" would be confusing to me, since it's not possible. Well, except maybe in an "lvalue" context.
An array is a container, holding a list. You can't return containers. Only values.
Scalar value is to scalar variable what list is to array. You can no more return a scalar variable than you can return an array.
Put another way, you can't take a reference to a list, only to an array. And yet you can't take a reference to the return value of a subroutine. You have to construct an anonymous array (a new container) to hold the value.
These are not just implementation issues. These are user-visible concepts, and affect your behavior if you have the proper model.
Your casual conversation may make sense to you, but you'll confuse your reader. And the point of communication is to communicate for the reader, not just for your own notes.