in reply to Can I change the IP by perl it own

That depends very much pn the details of your operating system, but since you didn't mention what you're using, how can we help you?

In any case, that's not a perl question - unless you meant to re-implement ifconfig in perl...