Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

(MeowChow) Re3: Check IP with support for CIDR

by MeowChow (Vicar)
on Apr 12, 2002 at 08:30 UTC ( #158523=note: print w/ replies, xml ) Need Help??


in reply to Re: (MeowChow) Re: Check IP with support for CIDR
in thread Check IP with support for CIDR

My bad, I forgot to negate the result:

return not unpack ('N', pack ('C4', split /\./, $i) ^ pack ('C4', spli +t /\./, $1)) >> 32 - $2;
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print


Comment on (MeowChow) Re3: Check IP with support for CIDR
Download Code
Re: (MeowChow) Re3: Check IP with support for CIDR
by xaphod (Monk) on Apr 12, 2002 at 08:56 UTC
    That works. So I guess you win this round of Golf.
    --
    TTFN, FNORD

    xaphod

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://158523]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-09-15 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (146 votes), past polls