in reply to Re: Converting between network and dotted quad. Issue with << and >> operators between Perl Versions.
in thread Converting between network and dotted quad. Issue with << and >> operators between Perl Versions.

zwon, thanks much! My sys admins just transferred our app to a new box and didn't tell me they installed 64bit. You were correct! Thanks again for your help!! Thanks to everyone for their input!

The Web is like a dominatrix. Everywhere I turn, I see little buttons ordering me to Submit. (Nytwind)
  • Comment on Re^2: Converting between network and dotted quad. Issue with << and >> operators between Perl Versions.

Replies are listed 'Best First'.
Re^3: Converting between network and dotted quad. Issue with << and >> operators between Perl Versions.
by ikegami (Patriarch) on Apr 13, 2009 at 17:53 UTC
    Like I mentioned in the CB, you reinvented inet_aton and inet_ntoa.
    use Socket qw( inet_aton inet_ntoa ); sub dotted_quad_to_network { return unpack 'N', inet_aton $_[0] } sub network_to_dotted_quad { return inet_ntoa pack 'N', $_[0] }