At 05:56 AM 2/1/2006 -0000, amit hetawal wrote: > I am a newbee in perl. Just wanted some guidance so as to how to implement multidimensional arrays in perl. I have to create an 2-d array with 26*26 of all the english alphabets so that for each row and column i can have a partiulcar value like a to a =1 >b to a=2;
>I am just not getting how to implelment this. >Can someone suggest something. What do u mean by an array of the alphabet? Arrays in perl can have numeric indexes only. So something like @array[a] is invalid. U can specify two dimensional values like $array[1][1] = "a"; that's offset column 1 row 1. There are various methods to automatically generate a 2D array with loops and maps. 3x3 2D array: @array = (["a", "b", "c"], ["e", "f", "g"], ["h", "i", "j"]); print $array[2][3]; #### g -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs