in reply to Remote host back online test

I would use something like Net::Ping or simply the external ping utility. Most of the external ping utilities have a way of only checking once or a short time whether a host is reachable, for example the Solaris and Win32 ping commands, so using that should be easy as well.