$ua = LWP::UserAgent->new(); $body = $ua->get($url); $json = JSON->new->allow_nonref; $perl_scalar = $json->decode( $body->decoded_content );