#!/usr/bin/perl -w

use strict;
use warnings;

my $rss_url = 'http://sourceforge.net/export/rss2_projsummary.php?group_id=93438';

use XML::RSS::Parser;

use LWP;
use LWP::UserAgent;
my $user_agent = LWP::UserAgent->new();
my $request = new HTTP::Request GET => "$rss_url";
my $result = $user_agent->request($request);

unless ( $result->is_success ) {
    # bad net, or site down for maintainence
    die "Sorry!\n";
}

my $parser = XML::RSS::Parser->new();
my $feed = $parser->parse_string( $result->content );

# output some values 
my $feed_title = $feed->query('/channel/title');
print $feed_title->text_content;
my $count = $feed->item_count;
print " ($count)\n";
foreach my $i ( $feed->query('//item') ) { 
    my $node = $i->query('title');
    print '  '.$node->text_content;
    print "\n"; 
}
