Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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("");

Replies are listed 'Best First'.
Re: Access webpage
by marto (Bishop) 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("");

    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(" +/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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1027042]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2017-11-19 16:36 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (282 votes). Check out past polls.