First, I urge you to try parsing this doc with a dedicated RSS parser,
it will do miracles for your needs. Second, the dumper you print here
is not the full document, but one branch, it might be that what you
loop over is not an arrayref, or might not work the way you think. Try
running a Dumper over the entire doc.

Aside, do you get any warnings from your code? It might shed a light
over what perl thinks the data structure is.

On 28 July 2010 15:59, Jasper2000 <hel...@gmail.com> wrote:
> Thanks Erez ... However, I did already look at the data in
> Data:Dumper, and still can't figure out how to access it. Mind you, I
> have done an identical loop for other XML data, from other sources,
> and it works fine (even with the element set to 0, which I don't quite
> get). Mind you, if it's of any use, here is the top portion of the
> data dump (content edited for brevity):
>
>
> $VAR1 = {
>  'count' => '10',
>  'story' => {
>              '16647039' => {
>                     'link' => 'http://www...somelink.html',
>                               'topic' => {
>                                          'Health' => {
>                                                      'short_name' =>
> 'health'
>                                                      }
>                                          },
>                                'status' => 'upcoming',
>                                'submit_date' => '1256158570',
>                                'container' => {
>                                               'Lifestyle' => {
>
> 'short_name' => 'lifestyle'
>                                                              }
>                                               },
>                                'comments' => '0',
>                                'description' => [
>                                                 'Some description in
> here'
>                                                 ],
>                                'diggs' => '1',
>                                'media' => 'news',
>                                'href' => 'http://digg.com/restofurl',
>                                'user' => {
>                                          'socialshopping2' => {
>                                                               'icon'
> => '',
>
> 'registered' => '1255514015',
>
> 'profileviews' => '105'
>                                                               }
>                                          },
>                                'shorturl' => [
>                                              {
>                                              'view_count' => '0',
>                                              'short_url' => 'http://
> digg.com/restofurl'
>                                               }
>                                              ],
>                                'title' => [
>                                              'Some title of some
> article'
>                                           ]
>                                 },
>                     '22914259' => {
>                                   'link' => 'http://www...next-
> link.html',
>                                   'topic' => {
>                                              'World News' => {
>
> 'short_name' => 'world_news'
>                                                            }
>                                            },
>                                etc,
>                                etc
>
>
> Any help would be most appreciated.
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>



-- 
Erez

Observations, not opinions

Reply via email to