#!/usr/bin/perl
use Net::EPP::Simple;
use strict;
use warnings;
 
my $epp = Net::EPP::Simple->new(
        host    => 'registrar.cm',
        user    => 'naphty',
        pass    => 'NaphtY2022',
);
 
my $domain = 'example.cm';
 
if ($epp->check_domain($domain) == 1) {
        print "Domain is available\n" ;
 
} else {
        my $info = $epp->domain_info($domain);
        printf("Domain was registered on %s by %s\n", $info->{crDate}, $info->{crID});
 
}