The system ping typically is suid-root
$ ls -l `which ping` -rwsr-xr-x 1 root root 40048 Dec 3 2008 /bin/ping ^ ^
which is why it does work (using 'icmp' method), while your unprivileged script does not. I don't think you're going to have much luck running this unprivileged.
In reply to Re: why doesn't Net::ping work when native ping does?
by Eliya
in thread why doesn't Net::ping work when native ping does?
by markseger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |