in reply to Re: multiple variable initialization in one line
in thread multiple variable initialization in one line
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.
|
|---|