Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Access webpage

by kash650 (Novice)
on Apr 04, 2013 at 22:33 UTC ( [id://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");

Replies are listed 'Best First'.
Re: Access webpage
by marto (Cardinal) 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 (Curate) 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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found