The second example is not equivalent to the OP code. The my only applies to $JAN.
my $JAN = my $FEB = my $MAR .... my $DEC = 0; would be better.However I suspect another data structure would better suit the OP's ultimate purpose, perhaps an array @Month_Whatever where $Month_Whatever[0] is January's figure etc.
Cheers,
R.
In reply to Re^2: multiple variable initialization in one line
by Random_Walk
in thread multiple variable initialization in one line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |