in reply to Perfectly Poor Ping Problem

rather than using things like
print "OK \n" if $p->ping("$push_ip_address",2);
try
$p->ping("$push_ip_address",2) || die "Can't ping address $push_ip_add +ress -- perl reports $!";
try adding || die on each of the lines you suspect is failing. this construct is so much your friend, it's hard to describe.

Replies are listed 'Best First'.
Re: Re: Perfectly Poor Ping Problem
by deprecated (Priest) on Feb 23, 2001 at 05:16 UTC
    Yep, boo is right here. However, I would suggest one additional thing:
    # use: warn "object constructed" if $obj = Module::new; $obj->brak() or warn "brak failed: ".$obj->error; # rather than print $obj->method("foo");
    because STDERR is unbuffered. I think our own japhy taught me this trick. You can also use:
    warn "the blargle flargle, $foo, is very busted!" if $DEBUG;
    so that when you are done with major development you can just set $DEBUG to 0.

    brother dep.

    --
    transcending "coolness" is what makes us cool.