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
In reply to Re: Adding an Entire Class B IP Range to an Array
by ambs
in thread Adding an Entire Class B IP Range to an Array
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |