in reply to Setting interface alias with perl

ifconfig sounds good. You might find the following pointers useful: List all network interfaces on the local machine?, How do I get the local internet IP address?

If you can install additional modules, thean NET::Interface and NET::ifconfig::wrapper might be another option for you.