Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | #!/usr/bin/env perl |
2 | use strict; | |
3 | use warnings; | |
4 | use LWP::Simple; | |
5 | use XML::Simple; | |
6 | use Data::Dumper; | |
7 | ||
8 | binmode(STDOUT, ":encoding(utf8)"); | |
9 | ||
10 | #print get('http://localhost/'); | |
11 | ||
12 | my $xml = new XML::Simple(ForceArray => 1); | |
13 | my $data = $xml->XMLin(get('http://blog.harvie.cz/rss/')); | |
14 | #print Dumper($data); #debug | |
15 | foreach( @{$data->{channel}[0]->{item}} ) { print("$_->{title}[0]\n\t$_->{link}[0]\n"); } |