"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
- Re: perl 6 requirements Bart Lateur
- Re: perl 6 requirements Peter Scott
- Re: perl 6 requirements Graham Barr
- Re: perl 6 requirements Chaim Frenkel
- Re: perl 6 requirements Randal L. Schwartz
- Re: perl 6 requirements Graham Barr
- Re: perl 6 requirements Randal L. Schwartz
- Re: perl 6 requirements Graham Barr
- Re: perl 6 requirements Randal L. Schwartz
- Re: perl 6 requirements Chaim Frenkel
- Re: perl 6 requirements Alan Burlison
- Re: perl 6 requirements Graham Barr
- Re: perl 6 requirements Nick Ing-Simmons
- Re: perl 6 requirements Chaim Frenkel
- Re: perl 6 requirements Chaim Frenkel