If you need to use system(), then use it. It's done thousands of times per day on a typical machine. If your script is not run every second or so, then it's probably ok. On the other hand, changing potentially a lot of files in /etc might be a bad thing. What if you want to change it all back? Learn to use firewall rules (it could be a really simple solution with those) if you need to redirect traffic or something like that.
I would suggest, if you really want to do this, to go simple like:
in reply to need to be able to search/replace by ip and hostname recursively in /etc based off ARG input
Consult perlrun documentation for "-i" switch and backup options when changing a lot of files like this.
perl -p -i -e 's/$old_ip/$new_ip/g' /etc/*files_to_change*