in reply to Re: checking ip ranges
in thread checking ip ranges

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re^3: checking ip ranges
by WoodyWeaver (Monk) on Mar 13, 2008 at 19:16 UTC
    Sure it was. The gotcha is that you are using lots of code which incidentally doesn't handle hostnames, only well-formed dotted quads (consider what your code does if the IP its fed is bad) when you could fairly easily use inet_aton and pick up some error checking. The code is so complex that it isn't self evident and requires you to ask for extra pairs of eyes to go over it -- another gotcha.

    Note that Socket is part of the core, and doesn't require an install fest.

Re^3: checking ip ranges
by amarquis (Curate) on Mar 13, 2008 at 19:23 UTC

    Well, what did you expect to hear? You already said what you wrote works, and didn't detail what failure meant to you. For example, your code obviously breaks if fed malformed data. But without knowing how you want to handle that, or even if you want to handle that, it is hard to discuss as a gotcha. The best advice would be to go grab a module that is fairly bulletproof with the grunt work, and keep your code as simple as possible.