in reply to $ENV{REMOTE_HOST} not set on new server?

Since the script hasn't changed it seems to be the server.

Tell us a bit more about the environment:

Server, OS, Versions of all, etc.