Fore.
$ perl -MSocket -e 'printf(("%02x"x4)."\n",unpack"C4",inet_aton shift) +' 127.0.0.1 7f000001
Update: Granted there's no error checking as the OP's, but that's a single regex at worst (and is left as an exercise for the reader . . . :).
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: IP to hex translator
by Fletch
in thread IP to hex translator
by actualize
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |