Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Adding an Entire Class B IP Range to an Array

by ambs (Pilgrim)
on Mar 31, 2005 at 16:52 UTC ( [id://443885]=note: print w/replies, xml ) Need Help??


in reply to Adding an Entire Class B IP Range to an Array

My first idea. Not small, but works.
my @hosts = map q|192.168.| . $_, 1..254; @hosts = map { my @h; my $ip = $_; push @h, "$ip.$_" for (1..254); @h } @hosts; for (@hosts){ print "$_\n"; }

Alberto Simões

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found