duble dimensional arry in shell script

How can I use dubble dimensional arry in shell scripts ?

I have written a program like this but there is an error

#!/usr/bin/ksh
x=1
for i in `cat switch.dat`
do
y=1
for j in `cat peak_offpeak.dt`
do
a[$x,$y]=$i ### problem here ###
y=`expr $y + 1`
done
k= 1
while [ $k -eq $y ]
do
echo $i" " ${a[x,k]} ###problem here ###
k=`expr $k + 1`
done
x=`expr $x + 1`
done

if anybody know the solution kindly mail me to :

             [email]kkodava@maxis.com.my[/email]

thanks

Krishna

ksh does not support multi-dimensional
arrays. The array subscript (somevar[subscript])
must be a value or arithmetic expression
that falls in the range of 0 to 511 (although
some implementations may have a larger limit).
You can simulate multi-dimensional arrays in awk
or the best solution might be to use perl since
multi-dimensional arrays are fully supported.