"Randal L. Schwartz" wrote:

> Graham> sub def { my @a = (9,8,7); return @a; }
> 
> That's not returning the array.  That's returning a copy of the contents
> of @a in a list context, and the number of elements of @a in a scalar
> context, using the "@a" operator.  You still haven't "returned the array".

So then in fact it is impossible to return an array - yes?  You can
either return a single scalar or a list.  The closest you can come to
returning an array as an entity is to return a reference to it - \@a.

Have I got that straight?

-- 
Alan Burlison

Reply via email to