#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Net::SNTP::Client qw ( getSNTPTime ); my %hashInput = ( -hostname => "127.0.0.1", -port => 12345, -RFC4330 => "1", -clearScreen => "1", ); my ( $error , $hashRefOutput ) = getSNTPTime( %hashInput ); print Dumper $hashRefOutput; print "Error: $error\n" if ($error);