in reply to Strange problem with nested arrays and scoping.
and I'm almost certain that you mean:push(@{@{@holder[$sheet]}[$iC]},@{@{@data[$sheet]}[$iC]}[$index]);
To simplify - to access an array element you use:push(@{${$holder[$sheet]}[$iC]},${${$data[$sheet]}[$iC]}[$index]);
The @array[...] notation is used to access a slice, for example @foo = @array[2 .. 4]; which would copy the data from $array[2], $array[3] and $array[4] to $foo[0], $foo[1], $foo[2].$array[254] = 'foo';
Fix your code to use $ instead of @ correctly, and see if that fixes your problem.
Michael
|
|---|