in reply to Checking return context, beyond wantarray()

Perl Cookbook 10.6 says...
if (wantarray()) { # list context } elsif (defined wantarray()) { # scalar context } else { # void context }