What would be the most efficient way to convert an IP address from hexadecimal to dotted quad notation?
E.g. from 7F000001 to 127.0.0.1
I came up with:
$ip = '7F000001'; use Socket; inet_ntoa( pack( "N", hex( $ip ) ) )
Originally posted as a Categorized Question.
In reply to Converting an IP from hexadecimal to dotted-quad by cpc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |