develooper Front page | perl.beginners | Postings from December 2002

Simple question.

Thread Next
From:
Michael Kramer
Date:
December 27, 2002 01:25
Subject:
Simple question.
Message ID:
BGEEKGJMCOLFCIGNDBCIKEDFFJAA.mkramer@rls2000.com
I need to make an array with multiple levels example:
I'm new to perl and have been programming in VBscript for about 2 years now
so the code here is in vb because i know that better.

dim my_array(1,3)
my_array(0,0) = "fred"
my_array(0,1) = "John"
my_array(0,2) = "mike"
my_array(0,3) = "dork"

my_array(1,0) = "mary"
my_array(1,1) = "sally"
my_array(1,2) = "stacy"
my_array(1,3) = "bigger dork"

response.write my_array(0,3)  'aka. "dork"

It's like an array inside an array.  I figured our arrays but hashes are
still a little weird.  This might be a perfect problem fixed by hashes.
Thanks to anyone who understands and tells me how to do this.

Michael Kramer
mkramer@rls2000.com


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About