#!/usr/bin/perl -w use strict; use XML::RSS::Parser; use URI; use LWP::UserAgent; use Data::Dumper; my $ua = LWP::UserAgent->new; $ua->agent('XML::RSS::Parser Test Script'); my @places=( 'http://www.mplode.com/tima/xml/index.xml' ); my $p = new XML::RSS::Parser; foreach my $place ( @places ) { # retreive feed my $url=URI->new($place); my $req=HTTP::Request->new; $req->method('GET'); $req->uri($url); my $feed = $ua->request($req); # parse feed $p->parse( $feed->content ); # print feed title and items data dump to screen print $p->channel->{ $p->ns_qualify('title', $p->rss_namespace_uri ) }."\n"; my $d = Data::Dumper->new([ $p->items ]); print $d->Dump."\n\n"; }