in reply to What I want to do with that
in thread Overwrite built-in wantarray()

Ewww. Why not just:
tested_sub(); ok(some side effect, "expected side effect"); my $scalar_response = tested_sub(); is($scalar_response, $expected, "gives proper scalar value"); my @list_response = tested_sub(); is_deeply(\@list_response,\@expected_response, "gives proper list valu +e");
Don't be trying to freak Perl out. I'd never expect the right response from giving it the wrong context. That's just asking for hurt.