in reply to Re: Running JavaScript from within Perl (or just use the API)
in thread Running JavaScript from within Perl
contains a "feed" url:https://public-api.wordpress.com/rest/v1/read/feed/?url=the-art-of-aut +ism.com
https://public-api.wordpress.com/rest/v1/read/feed/34259929
that I want to read.
The following code (based on this JSON Tutorial) gives an error "Use of uninitialized value $feedurl in print".
use strict; use warnings; use Mojo::UserAgent; my $url = 'https://public-api.wordpress.com/rest/v1/read/feed/?url=the-art-of-au +tism.com'; my $ua = Mojo::UserAgent->new; my $feedurl = $ua->get( $url )->result->json->{'feeds.meta.links.feed' +}; print $feedurl;
Pleae tell me what I'm doing wrong. Thanks.
|
|---|