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 contextInteresting example, though I fail to see how wantarray will help in this case:
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 use_wantarray { return wantarray ? () : 0 }
* except when used in void context, but that isn't relevant here.sub recommended_way { return; }
-Blake
|
|---|