On Wed, Aug 02, 2000 at 09:42:09AM -0700, Randal L. Schwartz wrote:
> >>>>> "Graham" == Graham Barr <[EMAIL PROTECTED]> writes:
>
> Graham> You say "operator" and you are right. I think the issue is a sub
> Graham> can return either.
>
> Really? How does a sub return "an array"?
There is a difference
sub abc { return (7,8,9) }
sub def { my @a = (9,8,7); return @a; }
print scalar abc(),"\n";
print scalar def(),"\n";
__END__
9
3
> (Unless you're about to mutter something about "lvalue subs" :) a sub
> can return only an rvalue. An "array" as an rvalue is always a list.
>
> Unless we disagree on the meaning of array and list. In that case,
> let's get back to terminology. :)
I am not refering to context, but what the user types. If an author
does not document the two subs above correctly as returning a list and an array
then a user may get surprised.
Graham.