So, I have a hash of array. The hash and arrays are initialized without a given length, so both are supposed to expand. I have isolated my problem to the latter 2 of the following three lines.
my $oldLength = @hash{$level};
$hash{$currentLevel}[$oldLength]=$var1;
$hash{$currentLevel}[$oldLength+1]=$var2;
In the case where I have to expand an array that has already been made before, everything fails, but if I constantly increase my $currentLevel (and therefore make new arrays) everything seems to work. Is there a small problem that I am missing here?
Thanks