Re: returning arrays

2016-02-21 Thread lee
Nathan Hilterbrand writes: > On 01/25/2016 05:13 PM, lee wrote: >> Paul Johnson writes: >> >>> On Mon, Jan 25, 2016 at 12:24:04AM +0100, lee wrote: Paul Johnson writes: >>> [...] Consider with these examples that an expression like (1, 3) might unexpectedly evaluate to 3, and you

Re: returning arrays

2016-02-21 Thread lee
Kent Fredric writes: > On 26 January 2016 at 12:02, Nathan Hilterbrand wrote: >> return wantarray() ? ($a, $b) : [$a, $b]; >> >> In a list context, you get back a list.. otherwise you get back a reference >> to a list. Might not be what you want, though. >> >> Works with arrays, too.. >> >> my