I would like to ask a help to create a Perl code where I could create alphanumeric sequential vars (that could be used as array, hash or any other kind of var).
for ( my $x = 1; $x <= 10; $x++ ){
my $var$x = "" *# to create empty variable with the word 'var' + the integer from x (var1, var2, var3, ...)*
for ( my $y = 1; $y < 10; $y++){
my $var$x = $var$x.''.$x.''.$y *# to store/concatenate the values from $x+$y into var$x*
}
print "$var$x"
}
What should print:
var1 = 11, 12, 13, 14, 15, 16, 17, 18, 19
var2 = 21, 22, 23, 24, 25, 26, 27, 28, 29
and so on
Thank you