in reply to Re^3: Return Value of List-Producing Elements in Scalar Context
in thread Return Value of List-Producing Elements in Scalar Context
True I should have used wantarray, but one intuitively expect a constant behavior...
(I had different code-branches which returned and I didn't want to duplicate wantarray checks for each branch.)
FWIW, here a possible implementation of listify: Re^3: wantarray alternative
Maybe something like l_return (always return list) and a_return (always return array) could help...
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|