[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] reading variables from files



Brant writes:

[snip]
>
>The data file looks like this (though the format could
>be different if necessary):
>
>carnivore,12,white meat only,23,vegitarian,10,vegan,2
>
>How do I read this in and turn it into an associative
>array? My current code looks like this, but it doesn't
>seem to create anything in the array:
[snip]
>But I get no luck...the array %countArray is
>empty!

Why don't you just do a dbmopen on the array. You can get your data from
there any time.

hansmartin


--
/ Hans Martin Lehmann          []  Wiesendangerstr.4          \
| E-Mail: hmlehman@es.unizh.ch []  CH-8003 Zurich/Switzerland |
| Phone: (41 1) 462 18 51      []  Kleegaertenstr. 57         |
\        (41 28) 46 29 75      []  3930 Visp                  /