# @array evaluated in scalar context. my $count = @array; #### # The s/// operates on $copy. (my $copy = $str) =~ s/\\/\\\\/g; #### # Prints $x. print($x = $y); #### # @array evaluated in list context. my @copy = @array; #### # @array evaluated in list context. my ($first) = @array; #### # Only dies if f() returns an empty list. # This does not die if f() returns a # false scalar like zero or undef. my ($x) = f() or die; #### my $count = () = f(); #### # Prints @x. print(@x = @y);