in reply to multiple variable initialization in one line
ormy ($JAN,$FEB,$MAR,$APR,$MAY,$JUN,$JUL,$AUG,$SEP,$OCT,$NOV,$DEC)=0 x 12;
Cheersmy $JAN=$FEB=$MAR=$APR=$MAY=$JUN=$JUL=$AUG=$SEP=$OCT=$NOV=$DEC=0;
Update:
as jmcnamara points out, in the first example the 0 should be in parens as in:
my ($JAN,$FEB,$MAR,$APR,$MAY,$JUN,$JUL,$AUG,$SEP,$OCT,$NOV,$DEC)= (0) + x 12;
Sweetblood
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multiple variable initialization in one line
by Random_Walk (Prior) on Jan 31, 2005 at 14:43 UTC | |
|
Re^2: multiple variable initialization in one line
by jmcnamara (Monsignor) on Jan 31, 2005 at 14:25 UTC | |
|
Re^2: multiple variable initialization in one line
by Anonymous Monk on Jan 31, 2005 at 14:18 UTC |