in reply to Windows fork problem or my ignorance?
A better sort:
sub pack_ip4 { pack 'C4', split /\./, @_ ? $_[0] : $_ } for ( map substr($_, 4), sort map pack_ip4($_).$_, keys %host_result ) { ... }
That way, it'll sort the IPs numerically (.30 will be after .29 instead of after .3) without having to resort to adding zeroes.
|
|---|