From: Dave Thomas Date: 2001-07-23T23:30:28+09:00 Subject: [ruby-talk:18346] Re: Newbie question: Data structures in Ruby. Erik writes: > In the end, the page should contain a list of articles, and each article > a list of elements. > I want to have acces to it like: > > puts currentpage.articles[2].elements[5].content > > I want to be able to manipulate this data structure like f.i.: > > currentpage.articles[2].elements[5].content = 'Hello world' > > I am not sure if or how I can realise this, could somebody please give > me a hint? You could use the wonderful new PerlValue package (available on the RAA) require 'perlvalue' currentpage = PerlValue.new currentpage.articles[2].elements[5].content = 'Hello world' p currentpage.articles[2].elements[5].content Regards Dave