use strict; use warnings; sub foo{ return (0, 1); } my $ct=0; { print "\nct:".$ct++."\n"; my $var = \(foo()); # $var is not a reference to the array (0, 1). but to the rightmost scalar print $var."\n"; print $$var."\n"; } { print "\nct:".$ct++."\n"; my $var = (foo()); # $var is the rightmost of list print $var."\n"; } { print "\nct:".$ct++."\n"; my ($var) = (foo()); # $var is the leftmost of list print $var."\n"; } { print "\nct:".$ct++."\n"; my $var = [foo()]; # $var is array reference print $var."\n"; }