[Bioperl-l] 500 Can't connect to www.ncbi.nlm.nih.gov:80 (Bad hostname)

RB sosippus at gmail.com
Mon Aug 11 13:31:37 UTC 2014


Hello!

I'm trying to connect to a NCBI page and retrieve some information.
Basically I want to retrieve what is under "Representative" in 
http://www.ncbi.nlm.nih.gov/genome/?term=Xylella_fastidiosa
<http://www.ncbi.nlm.nih.gov/genome/?term=Xylella_fastidiosa>  . For this
I'm trying to use LWP::Simple or LWP::UserAgent, but in no way am I able to
retrieve the HTML.

Here is my code:
-------------------------------------------------------
#!/usr/local/bin/perl
use strict;
use warnings;
use autodie;
use Data::Dump;
use LWP::Simple qw(get);

my
$content=get('http://www.ncbi.nlm.nih.gov/genome/?term=Xylella_fastidiosa');

dd $content;
-------------------------------------------------------

But I get an undef from this code. I read through  this post
<http://bioperl.996286.n3.nabble.com/Bio-Tools-Run-RemoteBlast-error-500-Can-t-connect-to-www-ncbi-nlm-nih-gov-80-td10210.html>  
and here is the result of two different pings:
-------------------------------------------------------
Pinging www.wip.ncbi.nlm.nih.gov [130.14.29.110] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 130.14.29.110:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

-------------------------------------------------------
Pinging www.google.com [173.194.112.240] with 32 bytes of data:
Reply from 173.194.112.240: bytes=32 time=46ms TTL=53
Reply from 173.194.112.240: bytes=32 time=46ms TTL=52
Reply from 173.194.112.240: bytes=32 time=45ms TTL=53
Reply from 173.194.112.240: bytes=32 time=45ms TTL=53

Ping statistics for 173.194.112.240:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 45ms, Maximum = 46ms, Average = 45ms
-------------------------------------------------------

So I guess this means there is something wrong on my side? What am I doing
wrong? Thanks for all the help




--
View this message in context: http://bioperl.996286.n3.nabble.com/500-Can-t-connect-to-www-ncbi-nlm-nih-gov-80-Bad-hostname-tp17624.html
Sent from the Bioperl-L mailing list archive at Nabble.com.


More information about the Bioperl-l mailing list