in reply to multiple variable initialization in one line
What about a hash?
ormy @months=qw/JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC/; my %whatever; $whatever{$_}=0 for @months;
If you really need to create all those vars then I may suggest to use a "special hash", i.e. to mangle the symbol table. But this is seldom the case and I strongly doubt it is for you, so I'm not proceeding in this sense...@whatever{@months}=(0) x @months;
|
|---|