I still can't grasp how the pack function works.
I need to turn dotted ip addresses to decimal representations like so:
10.50.1.5 (the ip address)
0a.32.01.05 (change each octet to hex)
0a320105 (concatenate the octets)
171049221 (change that hex number back to decimal)
I just know there's a cool way to do this using pack, but I haven't been able to get it. It may even be in a module, I just haven't looked in the right place.
Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
I need to turn dotted ip addresses to decimal representations like so:
10.50.1.5 (the ip address)
0a.32.01.05 (change each octet to hex)
0a320105 (concatenate the octets)
171049221 (change that hex number back to decimal)
I just know there's a cool way to do this using pack, but I haven't been able to get it. It may even be in a module, I just haven't looked in the right place.
Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com