| Server IP : 217.160.0.143 / Your IP : 216.73.217.84 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : u89353126 ( 3190106) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/doc/libxml-rss-perl/examples/ |
Upload File : |
#!/usr/bin/perl
use strict;
use warnings;
use XML::RSS ();
# print an error unless there are 2 command-line args
syntax() unless @ARGV == 2;
# get rss file and version to convert to from
# the command line
my ($file,$version) = @ARGV;
# create new instance
my $rss = XML::RSS->new;
# set output version
$rss->{output} = $version unless $version eq 'default';
# parse the rss file
$rss->parsefile(shift);
# output the new RSS to STDOUT
print $rss->as_string;
sub syntax {
die "Syntax: convert.pl <file.rss> <version>\n ex: convert.pl fm.rdf 1.0\n\n";
}