| Server IP : 217.160.0.64 / Your IP : 216.73.216.104 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : ws67269618 ( 67269618) PHP Version : 8.4.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /kunden/proc/self/root/kunden/proc/self/root/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";
}