Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Matching Sequential IP Addresses

by jwkrahn (Abbot)
on Apr 03, 2008 at 21:21 UTC ( [id://678270]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le'
    my %hashIPs = qw(
    ...
    Missing: 192.168.1.7 - 192.168.1.9
    Missing: 192.168.1.13 - 192.168.1.255
    
  2. or download this
    my @segments = grep {/^(\d{1,3}\.\d{1,3}\.\d{1,3})/} keys %hashIPs;
    
  3. or download this
    my @segments = map /^(\d{1,3}\.\d{1,3}\.\d{1,3})/, keys %hashIPs;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found