Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
Is there a nice way to initialise some variables to the same value ?my ($a,$b,$c)=(1,1,1);
Here I have to count and have the same number of entries in both arrays.
Nice would be something like: " my ($a,$b,$c)=1 for all;"
Many thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Initialisation of variables
by haukex (Archbishop) on Apr 08, 2023 at 07:11 UTC | |
|
Re: Initialisation of variables
by 1nickt (Canon) on Apr 08, 2023 at 10:29 UTC | |
|
Re: Initialisation of variables
by tybalt89 (Monsignor) on Apr 08, 2023 at 07:52 UTC | |
by Anonymous Monk on Apr 08, 2023 at 08:06 UTC |