in reply to my within brackets

I can't point to the docs, but it's parenthesis do not affect scope only precedence. There could be some exceptions, but that's generally how I think about it. E.g.,
(my $line); # scoped outside of `while` block while ($line = <>) { }
or
while (my $line = <>) { # $line scoped only inside of `while` block }
Treating my in a distributive way inside the parens shows your implicit understanding. I think. :-)

Replies are listed 'Best First'.
Re^2: my within brackets
by ikegami (Patriarch) on Oct 15, 2021 at 14:25 UTC

    It does more than affect precedence

    $ perl -M5.010 -e'sub f { 4,5,6 } say scalar( my $y = f )' 6 $ perl -M5.010 -e'sub f { 4,5,6 } say scalar( my ($y) = f )' 3

    See Re^2: my within brackets above