in reply to getting HTML source

I fail to see how not installing LWP will make your script more portable. Bundle LWP with your script when you distribute it if necessary. A reliance on things like 'lynx' is precisely what we're trying to avoid by using modules in the first place.

Your problem with your two system calls is probably because 'lynx' isn't in the script's path. Specify an absolute filename to the program or update your PATH accordingly.

If you "can't" install a module, you might just consider using IO::Socket and request the page by hand using Perl's native network support. That would be the "most" portable solution, but obviously you're never going to code yourself a solution that's as robust as using LWP in the first place will be.

Replies are listed 'Best First'.
Re: Re: getting HTML source
by ColonelPanic (Friar) on Jan 06, 2001 at 02:22 UTC
    Thanks for your help. I think that indeed was my problem with the calls to lynx. However, I have since abandoned that method precisely because of nonportability. The script now looks for LWP, and if it isn't found uses IO::Socket. It works fine for my purposes. Installing the module would be my first choice, but my primary goal is ease of installation. It has to be as easy to install as possible by people who don't know anything about Perl, and have as few files as possible.