This is a collection of Perl scripts which I have found personally useful under MacPerl. Many of these are scripts that I have found on on CPAN or elsewhere on the Internet and modified so they will work under MacPerl. A few are scripts I've written for my own use. Note: MacPerl 5.15r4-5.20r4 comes with MacPerl ports of libwww-perl-5.13 and libnet-1.0505. If you want to continue using the libnet in your MacPerl lib folder, use the updaters to bring the package up to the current version. If for some reason you want the full package, or you're using an earlier version of MacPerl (which you shouldn't be), grab the full package. If you're using 5.15r4-5.20r4, it's best that you *don't* install the full packages in your MacPerl lib, since they don't include Matthias' changes at this time. You should install the full packages into separate folders and then use your Library paths to choose which libnet or libwww you want MacPerl to use. libwww-perl-5 has changed so much that it's no longer reasonable to provide updaters, so get and install all of the packages that make up a full libwww-perl-5 installation. You are responsible for your own version tracking. There will always be a chain of updaters to bring the libnet that come with the latest MacPerl distribution up to date, but I am not going to make updaters for all possible combinations of versions, and the updaters do not check to see which version you have installed. If you install in the wrong order, or use the wrong updater, you can break something. You can always reverse the installation; see the README's in the updaters for details. Full package: libwww-perl-5.32.sit.hqx File-Counterfile-0.11.sit.hqx Font-AFM-1.17.sit.hqx HTML-Tree-0.50.tar.gz HTML-Parser-2.16.tar.gz With the release of libwww-perl-5.30, many of its parts were spun off into separate packages. Only some of them need to be modified for MacPerl. (Because of the extensive changes, I've decided to not provide updaters for the libwww-perl-5.13 that currently comes with MacPerl for the time being.) Those that need to be modified are in the form of .sit.hqx archives, while the ones that don't are in .tar.gz form, as they came from CPAN. To install the .sit.hqx archives, simply drop the contents of the archives in the top level of some folder in your MacPerl library search path. See the files README. in these archives for further details. To use the .tar.gz's, gunzip/untar with your favorite utilities, and then drag the contents of the lib subfolders into place. (In the case of HTML-Parser, you'll also need to put Parser.pm into the HTML folder.) Then make sure the files that you've just installed are Mac rather than Unix text files. (If you need more information on how to install CPAN modules, check the "Extensibility and Re-use" chapter of the online "MacPerl: Power and Ease" at .) libwww-perl-5 requires MacPerl 5.14r4 or later. libwww-perl-5 requires libnet for certain protocols, in particular FTP. The MIME modules (MIME::Base64 and MIME::QuotedPrint) that were previously distributed with libwww-perl-5 have been spun off into a separate package, which is available at Chris Nandor's web site, . You can also pick up MD5, which libwww-perl-5 uses for Digest Authentication, at Chris' site. And if for some strange reason you want mailto: URL's to work, you need MailTools, also available here. In order to use libwww-perl-5 effectively, I find that I need to bump the memory allocation of MacPerl up to 7.5 Mb on both my Powerbook 165 and my Performa 6400. Even the most trivial script will probably run out of memory with the default memory allocation. This archive does not contain the command line scripts that are included with the regular libwww-perl-5 distribution. That distribution is available at any CPAN site. Full package: libnet-1.0605.sit.hqx Updaters: libnet-1.0505_->_1.0602.sit.hqx libnet-1.0602_->_1.0603.sit.hqx libnet-1.0603_->_1.0604.sit.hqx libnet-1.0604_->_1.0605.sit.hqx Graham Barr's latest libnet, modified for MacPerl. See the file README.libnet.mac in the archive for further details. Requires MacPerl 5.10r2 or later. You *will* need to edit or create your own Config.pm before you use this if you use the full package; see README.libnet.mac for details. (If you have a single ISP and use the Config.pm included with MacPerl, it will ask Internet Config for appropriate values. If you have more than one ISP, like I do, Internet Config will not give the right values for your alternate ISP's.) libnet no longer requires Data::Dumper, but the included Configure script still uses it. Put the Net and auto folders in a folder in your MacPerl library search path, or use the updaters if you want to bring the libnet in MacPerl's lib up to the current version (in which case you probably won't have to worry about Config.pm). MIME-Base64-2.05: The MIME modules that used to be distributed with libwww-perl-5 can now be acquired in the form of compiled shared libraries for MacPerl from Chris Nandor at . The Perl only routines are still in the .pm's in case you can't use shared libraries. Data-Dumper-2.081: This is now available from Chris Nandor in a compiled version, using shared libraries. The libraries are available in both PPC and CFM68k versions, and the pure Perl .NOXSUB is also included, in case for some reason you can't use the shared libraries. Go to to find the latest version. MailTools-1.11.sit.hqx: Graham Barr's MailTools, modules for the creation, manipulation, and, with the aid of libnet, sending of Internet mail via SMTP. See the README.mailtools.mac in the archive for details. Requires MacPerl 5.10r2 or later. If you have trouble with this version of MailTools, you might want to replace the AutoLoader.pm and Exporter.pm in your MacPerl lib folder with the ones found here in Fixed_Library_Routines. Ping.pm: The working part of Russell Mosemann's Net::Ping with a couple of modifications needed to get it to work under MacPerl. MacPerl doesn't know the port number of TCP echo with "getservbyname", so I told it. ICMP ping does not work under MacPerl, so I put a specific error message in for it (rather than allowing it to die with the "must have root privileges" croak). But you can do UDP and TCP pings with this module. (Whether the machine you're trying to ping has either UDP or TCP echo enabled is another story...) Net-Telnet-3.01.tar.gz: Jay Roger's Net::Telnet now works as distributed with MacPerl. I have placed a copy of Net-Telnet-3.01.tar.gz from CPAN here. Conversions.pm: Contains the package Mac::Conversions, so this file should be placed in a folder named Mac in your MacPerl library search path. Mac::Conversions is a pacakge to do some file conversions commonly needed under MacOS: native Mac <=> Binhex, native Mac <=> MacBinary, Binhex <=> MacBinary. Open the file with Shuck to read the built-in pod documentation. Runs only under MacPerl 5.14r4 or later. Requires Convert::BinHex, which is available at or in CPAN. This works on 68k machines if you're using the CFM68k version, and should also probably work with BigMacPerl. I don't know if it will work with the stock 68k MacPerl. Fixed_Library_Routines: This directory contains fixed routines from the lib folder of the current version of MacPerl, 5.20r4, that I've had to modify for one reason or another. AutoLoader.pm was not reliably finding autosplit.ix files, which are used to predefine autoloadable routines. Failing to find autosplit.ix causes problems with libnet-1.060[1-3] and MailTools-1.xxxx. Exporter.pm is straight from the Perl 5.004_04 distribution; the one that comes with MacPerl is missing a sub export_to_level. This may not make any difference at all, but a problem I was having seemed to be solved by replacing this. Sys/Syslog.pm has multiple problems which need to be dealt with, among them a fork. (If you want to send messages to a syslogd, this Syslog.pm can do it, that is if something in between you and the LOGHOST isn't filtering UDP packets. There is a Mac version of syslogd at , but usually you'll find syslogd running on Unix machines.) lib: My own MacPerl library. The routines are all my own, and are generally undocumented but simple enough to understand. uucp.pl is a subroutine which will do file transfer using UUPC as the transport agent, but paths will need to be changed for this to work anywhere else. gopherlib.pl is a simple gopher client which can be used to get gopher URL's. isunix.pl is a simple way to tell what type of text file is sitting there on the disk (I have both Mac and Unix text files on my disks). url.pl is my own simple URL parser, which I wrote before I learned about libwww. uuencode.pl is a uuencoder I grabbed off of comp.lang.perl. getem5.pl: A script which takes a file(s) containing http, ftp, or gopher URLs and uses MacPerl to download them for later use. This uses many of the functions in my Perl library, which are in the lib subdirectory. getem5.pl uses libwww-perl-5, in this directory. These should be viewed as examples; you'll want to modify them to suit your own needs. In fact, this whole routine should be rewritten to use HTML::LinkExtor and LWP::Simple. testlinks5.pl: testlinks5.pl is my own rewrite of the testlinks.pl that came with the old libwww-perl-4. It's what I needed in a testlinks script that uses libwww-perl-5. This should be saved as a droplet, and will then test the http:, file: and ftp: hyperlinks of any (set of) html file(s) dropped on it. testlinks5 will also lie about gopher:. But since libwww-perl-5 transparently handles redirects, you won't get any information about redirects. Paths and filenames will have to be changed to suit your own setup. If you do link checking a lot, though, you should really consider using Big Brother, Francois Pottier's excellent shareware program which does just that: . Personally, that's what I do. I haven't used this script in a long time. lastm5.pl: A scripts I wrote to locally mirror http: URL's, and keep track of changes using the Last-modified header. (This should also be able mirror anything it can get a last modified time for, including ftp: and gopher: URL's, although I've never done it.) A longer description of what lastm5 does and how to use it is in the file itself. Beta: This directory contains scripts that run only under MacPerl beta's, or that are beta versions of scripts. *This directory is not included on the MacPerl CD-ROM* Paul Schinder schinder@pobox.com schinder@leprss.gsfc.nasa.gov ftp://ftp.clark.net/ftp/pub/schinder/