sub context { print defined wantarray ? wantarray ? 'list' : 'scalar' : 'void' } @foo = context() x 1; # "scalar" @foo = (context()) x 1; # "list"