in reply to Changing IP address on linux box

Regarding the permission issue you could "upgrade" your script to run as root:
if ($> != 0){ exec($^X, $0, @ARGV); }

(Not tested)