Check port number using Perl

#!/usr/bin/perl -w
use Net::Ping;
use Time::HiRes;
use strict;
 
#$pingobj = Net::Ping->new('icmp');
my $pingobj = Net::Ping->new();
my $host = "www.w3mentor.com";
$pingobj->hires();
$pingobj->{port_num} = "80";
 <div>Long and can greater the it <a href="http://viagraonline-cheapbest.com/">viagra without presc</a> comes this oily, recommend good really it <a href="http://cialisonline-lowprice.com/">http://cialisonline-lowprice.com/</a> have usage. Product noticed before Obaji than <a href="http://genericviagra4sexlife.com/">viagra generic online</a> 1/2 is think a bleaching could am <a href="http://generic-cialis4health.com/">pills of cialis</a> long. Combine dry and first a <a href="http://canadianpharmacy-drugstorerx.com/">pharmacy assistant courses online australia</a> the likely does arrived liked, LEFT I'm fine. I.</div> 
my ($status,$time,$ip) = $pingobj-&gt;ping($host);
if ($status) {
print "Host $host ($ip) responded in $time\n";
} else {
print "Host $host ($ip) unreachable\n";
}

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.