A couple of things:
- Read docs carefully.
- icmp MAY need suid 0 , udp and tcp don't.
- tcp just connects no data is transfered or echo'ed,
so if you just want test if target host is alive use tcp.
- Your example is little vague on target address. Make sure
your target is a host, not a domain. Not all domains, (ie foo.com)
have corresponding hosts (ie yahoo.com DOES, kingkong.com DOES NOT).
- Net::Ping will accept fully qualified host nmaes and IP numbers
they do not require packing
- Suggest using IP numbers first until you have it working.
Try good old ping('127.0.0.1')
mitd-Made in the Dark
'My favourite colour appears to be grey.'