FYI ... A BETA version of my 32-bit MSDOS Perl 5.000 port is now available: ***** IMPORTANT NOTE! THIS VERSION MAY HAVE BUGS, AND HAS A HIGHER THAN "USUAL" CHANCE OF CORRUPTING YOUR DISK. BACK UP YOUR HARD DISK BEFORE USING THIS VERSION. REPEAT: BACK UP YOUR HARD DISK BEFORE USING THIS VERSION! -r--r--r-- 1 bin bin 1170891 Oct 28 09:37 perl5a1.zip -r--r--r-- 1 bin bin 1198985 Oct 28 09:37 perl5a2.zip -r--r--r-- 1 bin bin 575899 Oct 28 09:37 perl5a3.zip This is, basically, a snapshot of my sources and executables, and is intended for use by people who want a "preview" of what I'm doing. It is not intended for production work, although I imagine that some people may want to use it for that. You must get all three .zip files. The sources and executables are all mixed together with these files, and I have not yet made an attempt at creating a minimal "binaries + support files" package. For a starting point, read the file "perl-5.000/readme.1st". At the end of this message, I've appended a list of changes/enhancements that I've made to Perl 5.000, since bigperl 4.036M3 (note that I just recently sent 4.036M4 off to SimTel). One change that is not mentioned is a minimally-working native Windows version of Perl 5.000. While the binary is included in the above package, it really isn't usable for much (really!). It's included mainly as a "gee-whiz" item. Also, dynamic loading is not supported, and the following packages are statically-linked: db_file, sdbm, and fcntl. Items on my list of things to do include: * General access to DOS interrupts. * Windows support (e.g., Perl DLL, DLL autoloading, etc.). I'm also working with a couple other sites to make MSDOS Perl 5.000 available, and will post any announcements here. -- Darryl Okahata Internet: darrylo@sr.hp.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion or policy of Hewlett-Packard or of the little green men that have been following him all day. =============================================================================== ***** Changes to make Perl 5.000: * NOTE: with Perl 5, the following trick to encapsulate Perl inside .BAT files no longer work: @rem = ' @echo off perl -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl '; # Insert your perl script here. Your perl script goes here, and only # here. __END__ :endofperl Perl complains about "@echo" needing to be quoted. Use the following form instead: @echo off perl -x -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl #! /usr/bin/perl # The previous comment is REQUIRED! This comment, and the following # ones, can be deleted. # Insert your perl script here. Your perl script goes here, and only # here. __END__ :endofperl Note that the above DEPENDS on having a line that begins with "#!" and contains "perl". * The a2p and s2p programs have been ported. Check out the "x2p" subdirectory. The "s2p" program is really "s2p.bat"; however, in order for this to work, perl.exe, dos4gw.exe, and perlcpp.exe must have been properly installed (be somewhere in %PATH). Both a2p.exe and s2p.bat produce MSDOS batch file syntax; the output can be placed directly into a .BAT file and immediately executed as such. This means that the output will have to be edited if you want to use it on some other platform, like Unix. Doing this is simple: a few lines at the beginning and end of the .BAT file need to be deleted. * Note that the output of s2p.bat is completely unindented. This is a side-effect of the simple C preprocessor used ("perlcpp.exe"), which is based upon the very ancient DECUS C preprocessor, and which deletes leading whitespace on a line. If you don't like this, edit the code using Emacs' perl-mode, and use the indent-region feature. * While a perlcpp.exe exists, perl's -P option has not (yet?) been implemented. * MSDOS Perl now verifies that "TMP", "TEMP", or "TEMPDIR" contains a valid directory before using it. However, no check is made to verify that files can actually be created in the directory (e.g., the directory may be on a read-only network drive). If none of these variables are set, or none contain a valid/existing directory name, the root directory of the current drive will be used (actually, the current drive *WHEN* the first temp file is created will be used -- this is an important distinction for those programs that switch between drives). Once a directory is chosen, that directory will continue to be used until perl terminates. * When executing files via system() or pipes opened via open(), any forward slashes ("/") in the executable program name are changed to backslashes. You can now use statements like: open(IN, "./perl /a/b/fooscr |"); This gets changed internally to: open(IN, ".\perl /a/b/fooscr |"); Before, this would not work because MSDOS tried to execute the command "." with the option "/perl". * Extra periods (".") in a filename are changed to underscores ("_"), to make it slightly easier to port Unix perl scripts (however, this can cause other problems). This allows the use of filenames such as "a.b.c.d", which gets translated into "a_b_c.d". However, note that this translation is done ONLY to files accessed directly by perl (via stat() or open()); NOTHING is done to filenames used in, for example: open(IN, "cat a.b.c.d|"); system("type a.b.c.d"); system("mycmd > a.b.c.d"); Also, the translation is done only for the actual BASE filename. Any directory specification up to the base file name is NOT translated. Repeat: directory names are *NOT* translated. For example, the following names get properly translated: This name Becomes ----------------- ----------------- /a/b/c/d/e.f.g.h /a/b/c/d/e_f_g.h /a/b/c.d/e.f.g.h /a/b/c.d/e_f_g.h /a/b/c.d/.e.f /a/b/c.d/_e.f But these do not: This name Becomes (illegal) ----------------- ------------------------- /a.b/.c.d/.e.f /a.b/.c.d/_e.f /a.b.c.d/e.f.g /a.b.c.d/e_f.g * The filename "/dev/null" is now auto-translated into "nul", the MSDOS equivalent of the null device. * Berkeley db now works properly. A bug in lseek() was found, reported, and worked around. Berkeley db 1.85 is now being used. GDBM has been drop-kicked. * The perlglob.exe program is now compiled using the 16-bit WATCOM compiler. Borland compilers are now superfluous. The compact memory model (64K code, >64K data) is still being used, to handle large directories. * The default location for the perl library support files is "c:\perl5\lib". This can be changed through the use of the PERLLIB environment variable, or by recompiling perl. * Locations of MSDOS files were shuffled around in possible anticipation of possible multi-platform compiles (e.g., MSDOS, Windows, Windows NT, etc.). * The perl documentation can be found as "pod" ("plain old documentation") files in the "pod" subdirectory. * Fixed bug where pipes in subroutines didn't work. For example, this failed: open(PIPE, "| myprog"); * An old version of the DOS/4GW extender is being used, because of suspected bugs in newer versions of the extender. * The "makeperl.bat" batch file is no longer needed to compile Perl. All flags are now set by the Makefile.