Re: ip to decimal ip and back
- From: uttamhoode@xxxxxxxxx
- Date: 17 Aug 2006 02:22:01 -0700
Thanks John,
i would prefer Socket module to convert the ip address.
Regards,
uttam hoode
John W. Krahn wrote:
uttamhoode@xxxxxxxxx wrote:
hi all,
i need a perl script to
1) convert ip address to decimal eg 127.0.0.1 to 2130706433
$ perl -MSocket -le'print unpack q/N/, inet_aton q/127.0.0.1/'
2130706433
and
2)decimal to ip address 2130706433 to 127.0.0.1
$ perl -MSocket -le'print inet_ntoa pack q/N/, 2130706433'
127.0.0.1
John
--
use Perl;
program
fulfillment
.
- Follow-Ups:
- Re: ip to decimal ip and back
- From: A. Sinan Unur
- Re: ip to decimal ip and back
- References:
- ip to decimal ip and back
- From: uttamhoode
- Re: ip to decimal ip and back
- From: John W. Krahn
- ip to decimal ip and back
- Prev by Date: Re: Regular Expression for Integer and float values
- Next by Date: Re: regular expression strangeness
- Previous by thread: Re: ip to decimal ip and back
- Next by thread: Re: ip to decimal ip and back
- Index(es):
Relevant Pages
|