in reply to •Re: Embedded variable assignments inside local declarations
in thread Embedded variable assignments inside local declarations

$a = 1, $b = 2, $c = 3; works, and that's exactly why my $a = 1, my $b = 2, my $c = 3; would work.

Although it looks odd, but from a Perl internal view, it is the same animal as the following (,which we see from day to day):

foreach $line (@lines) { ... }
works, that's why
foreach my $line (@lines) { ... }
Basically, Perl allows you to my variables on fly.

One more example for the same animal:
for (my $i = 1; $i < 10; $i ++) { print $i; }