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";
>
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++){
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
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
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";
$MyArray[1][0][0] = "B 1";
$MyArray[1][1]