http://qs321.pair.com?node_id=1189331


in reply to How to resolve bad hostname error message

I can successfully ping securities.stanford.edu ... Can't connect to www.securities.stanford.edu:80 (Bad hostname)

Note the different hostnames. From here, I can resolve securities.stanford.edu, but not www.securities.stanford.edu. Try changing your code to my $get_file = "http://securities.stanford.edu/...

Replies are listed 'Best First'.
Re^2: How to resolve bad hostname error message
by rachard11 (Acolyte) on May 02, 2017 at 18:03 UTC
    Wow--that seems to have gotten around the problem. I didn't realize removing the www. would make a difference. Thanks!