in reply to How do I check the return value of wantarray?

Well, one's written correctly and the other isn't. It seems as though you think that wantarray being defined is separate from whether it's true or false when actually your testc1 will say 'scalar' for the instance where it is both defined and true.