Mike Liss wrote:
> I am trying to create a multi-dimensional array
>
> $MyArray[ $SizeOfMyArray ];
>

You don't do that in Perl. There is no equivalent to BASIC's DIM
statement.

>
> So I can do this:
>
> print " $MyArray[ 0 ][ 0 ] \n";

You can do exactly that if you want to. The array will automatically
extend to whatever indices you use.

>
> And what I want to do is add items to the array dynamically

If you want to use push, pop, shift, unshift etc then do

    push @$MyArray[$i], $val

which (if the array was previously empty) will set $MyArray[$i][0] to
$val.

Anything else you need?

Cheers,

Rob




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to