|
$x{VAR_1} = 1;
$x{VAR_1}{VAR_2} = 2;
$x{VAR_1}++;
$x{VAR_1}{VAR_2}++;
print $x{VAR_1}."\n";
print $x{VAR_1}{VAR_2}."\n";
Output is 2,1
Does anyone know why it isn't 2,3?
Cheers
|
|
|
$x{VAR_1} = 1;
$x{VAR_1}{VAR_2} = 2;//here you delete the former line.
$x{VAR_1}++;
$x{VAR_1}{VAR_2}++;
print $x{VAR_1}."\n";
print $x{VAR_1}{VAR_2}."\n";
I think you must either treat it as a one dimensional array or two dimensional array,
not both.
|
|
|
|
|
|
|
|
|
// |