The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

#!/usr/local/bin/perl
#
# This example does what is known as a dsml ping.
# If there is a DSML server on line you should get a ping batch response.
#
#
# We are going to do a DSML Ping
#
$webdsml = Net::DSML->new( { url => $server } );
print "Doing ping request.\n";
if (!($webdsml->Ping()))
{
print "Ping request error.\n";
print $webdsml->error(),"\n";
exit;
}
if (!($webdsml->send()))
{
print "Ping send error.\n";
print $webdsml->error(),"\n";
exit;
}
# get the return xml content, should be the status of the dsml request.
$postData = $webdsml->content();
print $postData, "\n"; # print the xml data.