in reply to Count the number of return values from a subroutine
Observe, I have nothing up my sleeve!
sub foo { 5, 17 } # sub returning 2 values my $n1 = () = foo; # $n1 == 2 my $n2 = scalar foo; # $n2 == 17
You forgot the general rule about converting a list to a scalar: "there is no general rule for converting a list to a scalar"!
|
|---|