in reply to Unexpected variable assignment
my $c = ($a, $b++);
This line assigns last value of the list to $c (operation of comma operator) then increments the value in $b by 1.