Skip to content

Instantly share code, notes, and snippets.

@kyokutyo
Created March 14, 2009 08:16
Show Gist options
  • Save kyokutyo/79016 to your computer and use it in GitHub Desktop.
Save kyokutyo/79016 to your computer and use it in GitHub Desktop.
#!/perl/bin/perl
use strict;
use warnings;
use XML::TreePP;
my $tpp = XML::TreePP->new();
my $tree = $tpp->parsehttp( GET => "http://news.livedoor.com/topics/rss.xml" );
my $file = "/home/username/.opera/mail/signature.txt";
my $str = << "EOM";
foobar太郎 <foobar\@yourdomain.com>
===News===
$tree->{rss}->{channel}->{item}->[0]->{title}
$tree->{rss}->{channel}->{item}->[0]->{link}
EOM
open my $fh, '>', $file or die $!;
print $fh $str;
close $fh;
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment