#!/usr/bin/perl my $chantitle="gcu-squad.org"; my $chanlink="http://gcu-squad.org"; my $chandesc="promotion et support des unix libres"; my $nitems=4; my $itemtitle=3; my $itemlink=4; use strict; use LWP::Simple; use XML::RSS; my $rss = new XML::RSS (version => '0.91'); $rss->channel( title => $chantitle, link => $chanlink, description => $chandesc, ); my $sep="%%%"; $nitems++; if ($itemtitle) { $itemtitle=$nitems-$itemtitle; } if ($itemlink) { $itemlink=$nitems-$itemlink; } my $url=shift; my $txt=get($url); my @list=split("\n",$txt); my $index=0; foreach(@list) { $_=~s/&/&/g; if (($_ =~ m/$sep/) && ($index)) { $rss->add_item( title => $list[$index-$itemtitle], link => $list[$index-$itemlink], ); } $index++; } print $rss->as_string;