I recently had the desire to have a Ping program on my Macintosh. This would of course not be a problem if I has OSX, but I have not upgraded yet.

I thought of using MacPerl, so I looked and found Net::Ping, and put together a small program based on the docs to test the capability. It looks like this:


#!/usr/bin/perl -w


use Net::Ping;

print "\n\n\n";
my $host = "192.168.1.1";

$p = Net::Ping->new("tcp");
print "$host is ";
print "NOT " unless $p->ping($host, 2);
print "reachable.\n";
$p->close();



Well, it doesn't work. (The host is my router, which is physically connected to my computer, and is accessible through a web browser via the same IP, so I know that the IP is valid.)

I have tried the three protocol possibilities, and icmp doesn't run (I have found messages on the web saying that MacPerl can't do icmp, so I'm not surprised.) udp and tcp are never successful.

I'm running a pretty old version of MacPerl, since I never really had a need to upgrade (5.2.0r4), and Net::Ping seems to be version 2.02 from 1996.

Thanks for any help you can give...


--


       Tim Bailey       |\/     RIP Space Shuttle Columbia, 1979-2003
    [EMAIL PROTECTED]    |\/      Rick D. Husband - William C. McCool
   [EMAIL PROTECTED]   |       Michael P. Anderson - Kalpana Chawla
 http://www.moonrise.org     David M. Brown - Laurel B. Clark - Ilan Ramon
 --'--,--<@   @>--`--,--
 -----------------------------(35,707 days to)-----------------------------
 ----------------------------(the new Century!)----------------------------


My, my, this here Anakin guy May be Vader someday later, now he's just a small fry And he left his home and kissed his mommy goodbye Sayin' "Soon I'm going to be a Jedi" Soon I'm going to be a Jedi" - from "The Saga Begins", by "Weird Al" Yankovic

Reply via email to