in reply to Re: Re: variable set to 0 ? 0 : 1
in thread variable set to 0 ? 0 : 1

there's no substite for using wantarray to check your calling context
Interesting example, though I fail to see how wantarray will help in this case:
sub use_wantarray { return wantarray ? () : 0 }
Wont work properly in your example either.... Note that the above sub is equivalent* to the recommended way to return false, i.e. simply return:
sub recommended_way { return; }
* except when used in void context, but that isn't relevant here.

-Blake