in reply to Re^2: Host address not getting
in thread Host address not getting

Host address of: http://hostaddress is just not going to "work".
You need something that will work in a browser.
Maybe $hostaddress = Google; or something like that.
Simple "hostaddress" won't work.

First step is to see the webpage in a browser window before you try to get Perl to do it.

This "8161" is a port address at a specific web site.

my ($site) = ARGV; #might work better
If you ask about a command line parm, then show it in your question.