in reply to Incorrect number of values in list assignment

This requires the use of (shock!horror!) a global, but ...

c:\test>perl -E" sub x{(1) x int(rand 5)}; scalar(our@a=x())==3 and my($x,$y,$z)=@a or die qq[Trouble [@a]\n]; say qq[x:$x y:$y z:$z] " Trouble [] c:\test>perl -E"sub x{(1) x int(rand 5)}; scalar(our@a=x())==3 and my( +$x,$y,$z)=@a or die qq[Trouble [@a]\n]; say qq[x:$x y:$y z:$z]" Trouble [1 1 1 1] c:\test>perl -E"sub x{(1) x int(rand 5)}; scalar(our@a=x())==3 and my( +$x,$y,$z)=@a or die qq[Trouble [@a]\n]; say qq[x:$x y:$y z:$z]" Trouble [] c:\test>perl -E"sub x{(1) x int(rand 5)}; scalar(our@a=x())==3 and my( +$x,$y,$z)=@a or die qq[Trouble [@a]\n]; say qq[x:$x y:$y z:$z]" x:1 y:1 z:1

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy