in reply to Is it appropriate to handle errors through a subroutine?
It is clear enough, therefore it will work. Also consider a series of statements (in a subroutine as before) ...
return if ($website eq ...);
return if ($new_ip ~= ...);
...
die( ...);