Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Reg Ex to find IP address in range

by NetWallah (Canon)
on Aug 28, 2003 at 19:42 UTC ( [id://287503]=note: print w/replies, xml ) Need Help??


in reply to Reg Ex to find IP address in range

I recommend using NetAddr::IP to make your life much easier, and your code more readable.

from the docs:

use NetAddr::IP; my $ip = new NetAddr::IP 'loopback'; if ($ip->within(new NetAddr::IP "127.0.0.0", "255.0.0.0")) { print "Is a loopback address\n"; }
The module also has many other functions for defining and scanning subnets.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-19 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found