in reply to Re^3: Getting "uninitialized value" that I can't figure out...
in thread Getting "uninitialized value" that I can't figure out...

No, sorry for my ambiguity. Let me be pedantic... The code having a problem was:
printf("%s [ip: $ip] is alive  %.2f ms)\n", gethostbyip($host), 1000 * $duration);

Using three seperate printf statements would have shown that $duration and $host were defined, and that gethostbyip($host) returned an undef.

At that point, you could have asked the question Under what circumstances does gethostbyip return an undef?. Your sample code would have also been only four lines long.

I frequently use lots of printfs (or the debugger) to narrow down a question like this.

Replies are listed 'Best First'.
Re^5: Getting "uninitialized value" that I can't figure out...
by dguntner (Novice) on Jul 27, 2007 at 02:31 UTC
    Oh, ok! Yea, that makes sense. Thanks for the suggestion; I'll remember that next time I'm having strange messages such as that - you're right, debugging something that way would work much better.

    --Dave