sub foo { print "wantarray? ", wantarray?1:0, "\n"; } my @x =(foo(),foo(), foo()); my $x =(foo(),foo(), foo());