#!/usr/bin/perl use strict; use Data::Dumper; use Net::Curl::Easy qw(:constants); use XML::RSS::Parser; my $ua_string = "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"; my $curl = Net::Curl::Easy->new; my $feedsrc = "https://feeds.simplecast.com/o4MKcfjK"; my $feed; $curl->pushopt(CURLOPT_HTTPHEADER, [$ua_string]); $curl->setopt(CURLOPT_NOPROGRESS, 0); $curl->setopt(CURLOPT_FOLLOWLOCATION, 1); $curl->setopt(CURLOPT_CONNECT_ONLY, 0); $curl->setopt(CURLOPT_URL, $feedsrc); $curl->setopt(CURLOPT_WRITEDATA, \$feed); $curl->perform(); my $parser = XML::RSS::Parser->new(); $parser->register_ns_prefix('lc_itunes', 'http://www.itunes.com/dtds/podcast-1.0.dtd'); my $rss = $parser->parse_string($feed); print $rss . "\n"; #### $ ./test.pl % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 164k 100 164k 0 0 1267k 0 --:--:-- --:--:-- --:--:-- 1271k XML::RSS::Parser::Feed=HASH(0x618af3317380)