I am trying to make a perl script to send a get request to applications I have created. My applications are running on separate servers, so in order to make it seem like a domain, I added the ip's to my /etc/hosts file. My hosts file looks like:
10.1.10.50 test1.domain.com
10.1.10.51 test2.domain.com
When I run my script, which basically just does a get:
my $res = $mech->get("http://test1.domain.com/1");
I get the following error:
Error GETING http://test1.domain.com/1: test1.domain.com: unable to resolve
I am assuming that my perl script is not using my /etc/hosts file, is there anyway to make it check the hosts file for DNS or to setup domains in the program itself?
Thank you