in reply to Memory leak while printing ?? Don't think so....

If $array1[$msmtable][$row] doesn't exist, then you'd be expanding an array or two to autovivify that element.

>perl -MData::Dumper -E"my $x = qq{$a[4][2][8]}; print Dumper \@a;" $VAR1 = [ undef, undef, undef, undef, [ undef, undef, [] ] ];

If $msmtable or $row is very large, then you'd be allocating a very large array.

PS — "Memory leak" does not mean "large memory usage".

Replies are listed 'Best First'.
Re^2: Memory leak while printing ?? Don't think so....
by ikegami (Patriarch) on Aug 01, 2011 at 09:57 UTC

    Looking at your code more carefully,

    foreach my $row (@{$array1[$msmtable]}){ print OUT "$array1[$msmtable][$row][$x],"; }

    I see that $row is a reference to an array, yet you're using that reference as an index. There's the large number we were looking for.

    >perl -E"say 0+[];" 6994484

    You want:

    foreach my $row (@{$array1[$msmtable]}){ print OUT "$row->[$x],"; }
      Yes you are correct in both, this means that i'm done for today, because i sincerely did not see the second one (need a break)!! Thank you and ++ for prompt and helpful reply !!

      baxy