#!/usr/local/bin/perl

use strict;
use Net::Amazon;
use Data::Dumper; # for debugging
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($DEBUG);

#Your Amazon developer's token
my $dev_token='[dev token here]';

my $ua = Net::Amazon->new(token => $dev_token);

# Get a request object
my $response = $ua->search(exchange => 'Y04Y3424291Y2398445');

if($response->is_success()) {
    my $result = $response->result();
    print $result->ExchangeEndDate(), "\n";
} else {
        print "Error: ", $response->message(), "\n";
}
