Hello! I started to use Perl after a half year and I am trying to ping a website. But it not working. I can't ping it, it prints "Not working". When I try with system() it works, but I want to do it with Net::Ping. I also tried with icmp but it prints error, too: "icmp socket error - Bad file descriptor at line 11 " (line 11 is $p = Net::Ping->new('icmp');) what can I do with it? Am I wrong? Or is it a bug?
Thanks for help! My code is:use Net::Ping; $url = <>; $p = Net::Ping->new(); if ($p->ping($url)) { print "working"; } else {print "not working"; }
In reply to Net::Ping blowed my mind by jack298
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |