in reply to IP address generation
Maybe this will help:
use strict; use warnings; sub make_ip_list { my ( $from, $to )=@_; $_ = unpack "N", pack "C4", split /\./, $_ for $from, $to; do { print join(".",unpack "C4", pack "N", $from++ ),"\n"; } until $from > $to; } make_ip_list("0.0.0.0","0.0.1.0");
|
|---|