I would consider a ton of lexical variables code smell, especially if there's too many for you to count, and you are probably better off with a data structure like a hash or array. (see also perldsc)
But to avoid the repetition in the example you showed you can write: my ($x,$y,$z) = (42) x 3; (repetition operator)
In reply to Re: Initialisation of variables
by haukex
in thread Initialisation of variables
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |