in reply to IP address - long to dottedquad to long

Net::IP solutions:
# for just DottedQuadToLong(): use Net::IP; print Net::IP->new("24.72.30.83")->intip; # for both directions: use Net::IP qw/:PROC/; print ip_bintoint(ip_iptobin("24.72.30.83",4)); print ip_bintoip(ip_inttobin("407379539",4),4);

couple code comments:

Replies are listed 'Best First'.
Re^2: IP address - long to dottedquad to long
by ruzam (Curate) on Apr 28, 2006 at 20:36 UTC
    Nice tips. I rarely use map (it scares me) so I never would have thought of trying that. The spilt I should have seen coming...