in reply to Adding elements to a array reference

I think you meant for your inner loop to be for my $row (@$col).

Just push(@array, \@new_array) if you want it to literally refer to @new_array, or push(@array, [@new_array]) if you want to copy it in.


The PerlMonk tr/// Advocate

Replies are listed 'Best First'.
Re: Re: Adding elements to a array reference
by TASdvlper (Monk) on Jan 15, 2004 at 19:35 UTC
    ahh, yes I did mean that. Thanks a bunch.