G
gnu valued customer
Hello,
strings
--------
my ($a, $b, $c, $d, $e) = ''; # only $a is defined
my ($a, $b, $c, $d, $e) = ('') x 5; # all 5 are defined
numbers
--------
my ($a, $b, $c, $d, $e) = (0) x 5; # works for int too
Is the above use of the repetition operator (x) a
good practice for initializing a List, or are there
better ways?
tia,
tlviewer
strings
--------
my ($a, $b, $c, $d, $e) = ''; # only $a is defined
my ($a, $b, $c, $d, $e) = ('') x 5; # all 5 are defined
numbers
--------
my ($a, $b, $c, $d, $e) = (0) x 5; # works for int too
Is the above use of the repetition operator (x) a
good practice for initializing a List, or are there
better ways?
tia,
tlviewer