Improved code to get remote host and localhost names
Improved code to get remote host and localhost names
Returns empty array reference when the argument is not given or is undefined value