There can be a situation where we need to convert IPv4 Address(32 bit) from 4 octet format i.e. 127.0.0.1 to it decimal equivalent value i.e. 2130706433 and vice-versa. We can use pack, unpack in-built Perl functions to achieve this situation or we can use Socket.pm module (if allowed) along with pack and unpack, whichever you feel easier; you can use it in your code.