2. App-level ‘ping’
my $opt = getopts( 'ip_address|ip-address|i=s', ); my $target_host = $url->host; my $ip_addr = ip_from_name($target_host) // 'NXDOMAIN'; if($opt->{ip_address}) { $ip_addr .= " overridden to $opt->{ip_address}"; } print "Sending message to: $target_host ($ip_addr)\n";