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

Re: [MacPerl] reading variables from files



>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:

Why not make it look like this

%array=(carnivore,12,white meat only,23,vegitarian,10,vegan,2);

And read it in like this?

require "Array.pl";

--
Brad Cox; bcox@gmu.edu; GMU Pgm on Social and Organizational Learning
(703) 968-8229 Fax (703) 934 1578; Web http://www.virtualschool.edu/mon
The Middle of Nowhere Web, a project with paradoxical goals