http://qs321.pair.com?node_id=1141155


in reply to Re: JSON and Perl Objects - How to access data?
in thread JSON and Perl Objects - How to access data?

So how would you take the next step and represent this data in perl. For instance, if at the end of all this I want @name to hold 'Theodor Nelson','Morton Heilig' ,and @id to hold '_333301','_13204' how would I do that? I tried my @names = @{ $inventors_array[1]->{"name"}    }; but that gives me
Can't use string ("Morton Heilig") as an ARRAY ref while "strict refs" + in use
I'm not trying to define $names[Morton Heilig] = something, I'm trying to define $names[1]=Morton Heiling, or alternatively $names{_13204} = 'Morton Heilig'