Re: multi-dimensional array foreach loop...

2003-01-16 Thread John W. Krahn
Mike Liss wrote: > > Ok, > > I think I am beginning to see the light... > but I am still in the dark on this one... > > How would I iterate over these arrays? > > $MyArray[0][0][0] = "A 1"; > $MyArray[0][1][0] = "comment 1"; > > $MyArray[0][0][1] = "A 2"; > $MyArray[0][1][1] = "Comment 2"; >

RE: multi-dimensional array foreach loop...

2003-01-16 Thread david
Mike Liss wrote: > Sorry, > > I should have said... "How would I iterate over these arrays using > foreach" > Mike using foreach? have you try this yet? #!/usr/bin/perl -w use strict; my @array = ([[1..5],[2..6],[7..10]],[[11..15],[16..20],[21..25]]); foreach(my $i = 0; $i < @array; $i++){

Re: multi-dimensional array foreach loop...

2003-01-16 Thread Rob Dixon
Mike Liss wrote: > Ok, > > I think I am beginning to see the light... > but I am still in the dark on this one... > > How would I iterate over these arrays? > > $MyArray[0][0][0] = "A 1"; > $MyArray[0][1][0] = "comment 1"; > > $MyArray[0][0][1] = "A 2"; > $MyArray[0][1][1] = "Comment 2"; > > $MyArr

RE: multi-dimensional array foreach loop...

2003-01-16 Thread Liss, Mike
Sorry, I should have said... "How would I iterate over these arrays using foreach" -Original Message- From: Liss, Mike [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 8:33 AM To: [EMAIL PROTECTED] Subject: multi-dimensional array foreach loop... Ok, I think I am beginning