in reply to How to read from an URL ?

This raises a very interesting question ... I'm actually somewhat surprised that IO::All doesn't do this already :-)

After all ... IO::All is great at doing things the "naive" way...

Update: Thanks, itub - I just looked at the IO::All docs, and didn't even notice the plethora of add-ons :-)

Replies are listed 'Best First'.
Re^2: How to read from an URL ?
by itub (Priest) on Mar 31, 2005 at 19:38 UTC
    It does, if you install IO::All::LWP:
    # examples from the SYNOPSIS use IO::All; "hello world\n" > io('ftp://localhost/test/x'); # save to FTP $content < io('http://example.org'); # GET webpage io('http://example.org') > io('index.html'); # save webpage

    And you can also tie it, treat is as a file, and use other IO::All tricks:

    my $io = io('http://example.org')->tie; while (<$io>) { # do something }
      After already having succeding with LWP::Simple; I tried IO::All.
      But it didn't compile. I got some Error for not finding a Spiffy constructor. What did I wrong?
        Did you install Spiffy? It's one of the required modules.