Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
However these are the results & error that I get:use strict; my ($JAN,$FEB,$MAR,$APR,$MAY,$JUN,$JUL,$AUG,$SEP,$OCT,$NOV,$DEC)=0; print "JAN: $JAN\n"; print "DEC: $DEC\n";
However, it appears that only the first in the list, $JAN, get assigned the zero; all the others appear to be uninitialized.JAN: 0 Use of uninitialized value in concatenation (.) or string at P:\test37 +9.pl line 7. DEC:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multiple variable initialization in one line
by sweetblood (Prior) on Jan 31, 2005 at 14:09 UTC | |
by Random_Walk (Prior) on Jan 31, 2005 at 14:43 UTC | |
by jmcnamara (Monsignor) on Jan 31, 2005 at 14:25 UTC | |
by Anonymous Monk on Jan 31, 2005 at 14:18 UTC | |
|
Re: multiple variable initialization in one line
by holli (Abbot) on Jan 31, 2005 at 14:06 UTC | |
|
Re: multiple variable initialization in one line
by blazar (Canon) on Jan 31, 2005 at 15:07 UTC | |
|
Re: multiple variable initialization in one line
by Roy Johnson (Monsignor) on Jan 31, 2005 at 15:24 UTC | |
|
Re: multiple variable initialization in one line
by Random_Walk (Prior) on Jan 31, 2005 at 15:33 UTC | |
|
Re: multiple variable initialization in one line
by sh1tn (Priest) on Jan 31, 2005 at 18:15 UTC |