Implemented get_ip_version in Utils.pm for IP version number determination and invalid IP address detection