Would this (untested!) not work?
use 5.14.2;
use strict;
use warnings;
use XML::RSSLite;
use LWP::Simple;
my @keywords = qw(approach);
my @URLlist = (
'http://www.theguardian.com/theguardian/mainsection/rss',
'http://www.theguardian.com/theguardian/mainsection/rss1',
);
foreach my $URL ( @URLlist ) {
my $content = get($URL);
my %result;
parseRSS(\%result, \$content);
my $re = join "|", @keywords;
$re = qr/\b(?:$re)\b/i;
foreach my $item (@{ $result{items} }) {
my $title = $item->{title};
$title =~ s{\s+}{ };
$title =~ s{^\s+}{ };
$title =~ s{\s+$}{ };
if ($title =~ /$re/) {
print "$title\n\t$item->{link}\n\n";
}
}
}