Re: Accessing 2D array

2004-10-28 Thread Khairul Azmi
This could be it. My final question is how to do it when we have two arrays to pass to a subroutine. I am using the techniques I came accross in perldoc perlsub but could not figure out what should I have on the marked line. sub func2 { my ($local_value, $local_array) = @_; foreach my $v

Re: Accessing 2D array

2004-10-28 Thread John W. Krahn
Khairul Azmi wrote: Thanks for the solution. Not sure if this is still on topic but I then add an additional parameter to the subroutine sib func { my (@local_array, $local_value) = @_; print "$local_value \n"; for my $array ( @local_array ) { for my $element ( @$array ) { pri

Re: Accessing 2D array

2004-10-28 Thread Khairul Azmi
Thanks for the solution. Not sure if this is still on topic but I then add an additional parameter to the subroutine sib func { my (@local_array, $local_value) = @_; print "$local_value \n"; for my $array ( @local_array ) { for my $element ( @$array ) { print "$element ";

Re: Accessing 2D array

2004-10-28 Thread Jose Alves de Castro
On Thu, 2004-10-28 at 10:19, Khairul Azmi wrote: > I've been trying to solve this problem using many techniques I found > on the websites but still unsuccessfully Hi. I don't have much time, so I probably won't be able to explain this right now, but here's a working version of your code, give it

Re: Accessing 2D array

2004-10-28 Thread John W. Krahn
Khairul Azmi wrote: I've been trying to solve this problem using many techniques I found on the websites but still unsuccessfully sub func { my (@local_array) = @_; for (my $i=0;$i<@local_array;$i++) { for (my $j=0;$j<@local_array[$i];$j++) { print "$local_array[$i[[$j] ";

RE: Accessing 2D array

2004-10-28 Thread Murphy, Ged (Bolton)
>I've been trying to solve this problem using many techniques I found >on the websites but still unsuccessfully > >sub func { > my (@local_array) = @_; > > for (my $i=0;$i<@local_array;$i++) { > for (my $j=0;$j<@local_array[$i];$j++) { > print "$local_array[$i[[$j] "; > } >