sub test { print(defined(wantarray)?1:0, " "); print(wantarray?1:0, "\n"); } test(); # 0 0 $a = test(); # 1 0 @a = test(); # 1 1