in reply to Re: Strange problem with nested arrays and scoping.
in thread Strange problem with nested arrays and scoping.

Very true. Thank you for the tip. I've cleaned up my code (throughout the entire script), and it's now considerably less gory to read.

However, the problem persists :(

print "Pushing ".$data[$sheet][$iC][$index]." onto holder[$sheet][$iC] +\n\n\n"; push(@{$holder[$sheet][$iC]}, $data[$sheet][$iC][$index]); print "holder[$sheet][$iC] = ".$holder[$sheet][$iC]."\n";
Yields
Pushing 1-Jun-97 onto holder[0][3] holder[0][3] = TTY9.3

Other notes:
@holder is initalized with "my @holder". $holder[$sheet] is initialized with "$holder[$sheet] = ('');" (so that I can reference it in array context and push values.

Anyone know what else may be happening?

Replies are listed 'Best First'.
Re: Re: Re: Strange problem with nested arrays and scoping.
by Zaxo (Archbishop) on Dec 02, 2003 at 21:31 UTC

    Erm, $holder[$sheet][$iC] ought to print as something like "ARRAY(0x8106164)" since the push makes it an array reference. Is there more to this than you've shown?

    After Compline,
    Zaxo