in reply to Re^3: Context aware functions - best practices?
in thread Context aware functions - best practices?
Ugh, that's the worst of both worlds, esp if I didn't know the number of return values beforehand (I do in the situation at hand). In that case every invocation in scalar context will have to be tested with ref.. if it at least consistently returned an arrayref I wouldn't have to think about it.
As I said, what I want is the same convenience as CGI offers with my $foo = $cgi->param(''); vs my ($foo) = $cgi->param(''); - you get the same result either way. Nothing else.
If you don't like the idea of throwing away results, consider my $foo = (bar(), baz(), qux());. I'm asking for pretty much the same semantics.
Makeshifts last the longest.