#!/usr/bin/perl use strict; use warnings; use REST::Client; use LWP::UserAgent; MAIN: { my $ua = LWP::UserAgent->new( ssl_opts => {verify_hostname => 0}, ); my $client = REST::Client->new( timeout => 30, useragent => $ua,); $client->GET(); #assigning the API response to a variable my $response = $client->responseContent(); print $response."\n"; }