On Sep 10, 10:48 am, Benoit Lefebvre <benoit.lefeb...@gmail.com>
wrote:
> On Sep 10, 10:38 am, "ame...@iwc.net" <ame...@iwc.net> wrote:
> > I need to create an array. Each element will have 1 row and 3
> > columns. So, the array would look something like this:
>
> > $x[1] = 1,2,3
> > $x[2] = 4,5,6
> > $x[3] = 7,8,9
>
> > Basically, I have 1 row and 3 columns.........how would I store
> > the values, and retrieve the values???
> You can make an array of array
>
> $x[1][1] = 1;
> $x[1][2] = 2;
> $x[1][3] = 3;
> $x[2][1] = 4;
You're sticking undefined values all over the place. Arrays in Perl
start with 0, not 1. You've made $x[0] undefined, as well as $x[1]
[0], $x[2][0], etc.
> see:<link to pirated material snipped.>
Please don't do that again. Perl has free built-in documentation
available. Reference that.
http://perldoc.perl.org. Do not post
links to commercially available material that people have illegally
duplicated.
Paul Lalli