In article <RCkSb.6281$ ogers.com>,
Kien Ha <> wrote:
:mike wrote:
:> i need to verify if an ip-address falls inside a range for example,
:use IO::Socket qw(inet_aton);
Looking at perldoc, it appears to me that should be Socket instead
of IO::Socket .
: my $packed_ip = inet_aton($_);
: if ( $packed_ip lt $lower or $packed_ip gt $upper ) {
I realized a potential flaw in my pack 'C4' version:
I was using network byte order and numeric comparisions, which
would fail on small-endian or machines with other unusual binary
storage orders. I see that your version avoids that by doing
string comparisons instead of numeric comparisons. Think I'll
go edit some of my code now...

--
We don't need no side effect-ing
We don't need no scope control
No global variables for execution
Hey! Did you leave those args alone? -- decvax!utzoo!utcsrgv!roderick