in reply to How can I create an array that holds number of variables with values?
Both of the above will work fine. The values start out undefined, and in most cases (but not all) they do not need an explicit initialization.my $var1; $var1++; print "Var1 is now $var1\n"; my $var2; $var2 = "Foobar"; print "Var2 is now $var2\n";
|
|---|