start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: close Chapter 8
Standard Modules
Next: Reference: pingecho
 

ping

$

p


->ping(


host


[,
 

timeout


])

Pings remote host and waits for a response. Takes the following arguments:

host

Specified as either the hostname or the IP number of the remote host.

timeout

Optional, must be greater than 0 seconds if specified. Defaults to whatever was specified when the ping object was created.

If host cannot be found or there is a problem with the IP number, returns undef . Otherwise, returns 1 if the host is reachable and 0 if it is not.


Previous: Reference: close Perl in a Nutshell Next: Reference: pingecho
Reference: close Book Index Reference: pingecho