Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Access webpage

by kash650 (Novice)
on Apr 04, 2013 at 22:33 UTC ( #1027042=perlquestion: print w/ replies, xml ) Need Help??
kash650 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I've been trying for hours to see how to read the text from a webpage but can't find a proper solution. I've tried this, but it doesn't work. I just want to save the text to read it / directly read it

use IO::All; my $html < IO("hgdownload.soe.ucsc.edu/goldenpath/hg19/database:80");

Comment on Access webpage
Download Code
Re: Access webpage
by marto (Chancellor) on Apr 04, 2013 at 23:00 UTC

    You could use a module such as WWW::Mechanize to access the page content. Looking at the page I note that they request you download large files via FTP. If this is Bio Informatics data look into BioPerl to see if there's an simpler more perlish way to achieve your goal. Perl and Bioinformatics

Re: Access webpage
by Loops (Hermit) on Apr 04, 2013 at 23:32 UTC

    Howdy, your syntax is just a little off:

    use IO::All; my $html < io->http("http://hgdownload.soe.ucsc.edu/database:80");

    Note that the "io" is in lowercase, not upper as in your example. You also need the "->http" method, and "http://" prefix in your url.

    Also, you'll have to ensure that you have the IO::All::LWP module installed.

      The original URL is mangled:
      use IO::All; my $html < io->http("http://hgdownload.soe.ucsc.edu:80/goldenpath/hg19 +/database");
      The :80 needs to be after the domain name, but is redundant. It is only needed if it is not port 80.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1027042]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-07-30 01:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls