#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
use Data::Dumper;
#use Devel::Comments; # uncomment this during development to enable the ### debugging statements
my $rss = get "http://honestandroidgames.com/feed/";
my @matches = ($rss =~ m#(?:
|)[^>]*|https://play.google.com[^"]*#ig);
my $title;
my $pubdate;
print ;
foreach my $match (@matches) {
if ($match =~ s/^//i) {
$title = $match;
} elsif ($match =~ s/^//i) {
$pubdate = $match;
# $pubdate =~ s/^\S+\s//; # remove day-of-week
$pubdate =~ s/ \d\d:.*//; # remove time
$pubdate =~ s/ \d\d\d\d$//; # remove year
$pubdate =~ s/,//; # remove comma after day-of-week
} elsif ($match =~ /^http/) {
print "$pubdate | $title\n";
}
}
__DATA__
Content-type: text/html
|