G'day David / P5P, david nicol wrote: >>Eh? what would wantarray return a ref to in >> >> sub f { wantarray() ... } >> ($a, $b, @c) = f(); > > an array of aliases to $a, $b, and $c: > > [${\$a},${\$b},${\$c}] So what do we do in the case of: print f(); wantarray() should clearly by true, but there are no variables that we can alias. This could be worked around by creating an alias to a transient anonymous variable, which is then passed to print upon completion. However I'm not sure if we can do that without losing performance. Cheerio, Paul -- Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681Thread Previous | Thread Next