in reply to how to read data from a URL

Use LWP::Simple. Or, *gasp!*, IO::All. No, I didn't really say that! LWP::Simple, or full grown LWP, if LWP::Simple isn't flexible enough. That's the sane approach.

Replies are listed 'Best First'.
Re^2: how to read data from a URL
by clinton (Priest) on May 15, 2007 at 10:22 UTC
    With regards IO::All - I hadn't read the POD until your comment. It sounds like a good idea, so why would you hesitate to recommend it as a unified interface? (other than the fact that Ingy says that he may break backwards compatibility in the future)?

      Using IO::All reopens all the security holes that the three argument form of open fixes. Of course, in the sense of universality, IO::All is just like PHP, which also has these problems of being able to launch a process or access a foreign website via an open with an unguarded filename, so there is no loss by using IO::All, but especially when writing applications that are publicly accessible, it's better to have less magic.

        Interesting. It does highlight a bit of a problem with CPAN though. i.e. If the module authors decline to put such information into the docs, how does a casual Perl programmer know about the risks?
        Thanks Corion - skim-reading the docs was clearly insufficient.