[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Will webget work in MacPerl.





Chris Nandor wrote:

> Don't use webget.  It is old code, and can be done much more easily with
> modules that come with MacPerl.
>
> What do you need to do, fetch a web page?
>
>   #!perl -w
>   use LWP::Simple;
>   $x = get('http://www.ptf.com/macperl/');
>   print $x;
>
> FYI, the problem with webget (particularly, network.pl) is that it calls
> out to the Unix shell to run nslookup, ifconfig, and other things that Macs
> don't have (on a shell, anyway).  But the above code works out of the box
> on current versions of MacPerl.
>
> Hope this helps,
>

While I fully agree with Chris that webget is ancient  and one really should
use more modern resources, I guess I am from the old school and a few months
ago I decided to see if I could get old webget to chug away on my Mac.  With
very little hassle, Igot it to work.  So it's possible.    Jeffrey Friedl has
a version of webget  with network.pl and www.pl incorporated as subroutines,
so it is one file, which is what I used.  You have to give @ARGV the web
address via the standard MacPerl input methods  and output needs to be saved
and converted to Mac format.  I used MPW's redirects for  that.

That said, I don't know of  any good reason to use it on a Mac, other than
pure nestalgia.

George


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch