The nice thing about inet_aton is that it works even with text names like "www.xyzco.com".use Socket; my $ip_hex = join('.', map { sprintf("%02X", ord($_)) } split(//, inet_aton($addr))); my $ip_dec = join('.', map { hex($_) } split(/\./, $ip_hex));
In reply to Re: IP Address Conversion to Hex
by tadman
in thread decimal -> hex
by FireBird34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |