Re: ip to decimal ip and back
- From: "John W. Krahn" <someone@xxxxxxxxxxx>
- Date: Thu, 17 Aug 2006 06:29:50 GMT
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: uttamhoode
- Re: ip to decimal ip and back
- References:
- ip to decimal ip and back
- From: uttamhoode
- ip to decimal ip and back
- Prev by Date: Re: ip to decimal ip and back
- Next by Date: Regular Expression for Integer and float values
- Previous by thread: Re: ip to decimal ip and back
- Next by thread: Re: ip to decimal ip and back
- Index(es):