Camel book for 5.0 and DOS. 
Author Message
 Camel book for 5.0 and DOS.

I  am a relative newcomer to both UNIX and perl. While I don't
 pretend to know (or understand) all of the camel book, I find that
 it is extremely helpful (understatement), even if somewhat terse
 for newbies, particularly if they are new to UNIX.

 The purpose of this post, is a plea to Larry and Randal to pay
 more attention to perl on the various ports to DOS and OS/2 in the
 next edition of the camel book, rather than the near total neglect
 in the current edition. I realize that the Nutshell series is
 targeted at UNIX programming, and that there are several different
 ports to DOS and OS/2, nevertheless, comments about the
 differences between perl on Unix and the other OS's would be of
 major help to a large body of perl users.

 Comments on how to emulate some of the UNIXisms on DOS and OS/2,
 despite their limitations, would be valuable wherever possible,
 particularly with respect to I/O and command such as system and
 exec etc. Notes as to what is not possible due to OS limitations
 would be equally valuable. Dito for the differences in globbing,
 metacharacters, quoting etc.

 Sincerely.

 Henry Manaster

--
***************************************************************************

        Brooklyn, NY            *
                                *
        Disclaimer: The above is not necessarily MY opinion nor that
                                of anyone else :-)  ????!
****************************************************************************



Mon, 28 Aug 1995 14:17:37 GMT  
 Camel book for 5.0 and DOS.

) Subject: Camel book for 5.0 and DOS.
) Date: Wed, 10 Mar 93 22:17:37 PST
) Organization: School of Engineering and Applied Sciences, UCLA
)
) I  am a relative newcomer to both UNIX and perl. While I don't
)  pretend to know (or understand) all of the camel book, I find that
)  it is extremely helpful (understatement), even if somewhat terse
)  for newbies, particularly if they are new to UNIX.
)
)  The purpose of this post, is a plea to Larry and Randal to pay
)  more attention to perl on the various ports to DOS and OS/2 in the
)  next edition of the camel book, rather than the near total neglect
)  in the current edition. I realize that the Nutshell series is
)  targeted at UNIX programming, and that there are several different
)  ports to DOS and OS/2, nevertheless, comments about the
)  differences between perl on Unix and the other OS's would be of
)  major help to a large body of perl users.
)
)  Comments on how to emulate some of the UNIXisms on DOS and OS/2,
)  despite their limitations, would be valuable wherever possible,
)  particularly with respect to I/O and command such as system and
)  exec etc. Notes as to what is not possible due to OS limitations
)  would be equally valuable. Dito for the differences in globbing,
)  metacharacters, quoting etc.
)

While I agree that such information would be usefull, you can not
expect Larry or Randal to try to document all of these differences.
The only reason many differences exist is due to the poor organization
of the DOS OS (if you can call it that).  And, the only reason the DOS
ports exist is becuase someone else wanted them enough to hack the
code to get ports to compile.

The DOS version of the of  PERL manual does document these
differences.  It comes with Len Reed's port.  Furthermore, that manual
has been converted to a Norton Guides database.  Len Reeds port, and
the NG Manual can be found on SIMTEL and it's mirrors:

pd1:<msdos.perl>
perl419x.zip
ngperl10.zip




Tue, 29 Aug 1995 04:16:52 GMT  
 Camel book for 5.0 and DOS.
I am posting a response I received by email in the hope that what
 Sharron suggests might lead to some inclusion of DOS and OS/2 perl
 ports in the next camel book. Perhaps the port authors could
 collaborate on a chapter for the book, and submit that to Larry
 and Randal for their consideration. Perhaps Larry and Randal might
 even consider asking one of the port authors, to suggest footnotes
 throughout the book, that would pertain to the applicability of
 the referant section of the book, to DOS ports.

 The original posting and response follow:----------------------


Quote:
> I am a relative newcomer to both UNIX and perl. While I don't
> pretend to know (or understand) all of the camel book, I find that
> it is extremely helpful (understatement), even if somewhat terse
> for newbies, particularly if they are new to UNIX.

> The purpose of this post, is a plea to Larry and Randal to pay
> more attention to perl on the various ports to DOS and OS/2 in the
> next edition of the camel book, rather than the near total neglect
> in the current edition. I realize that the Nutshell series is
> targeted at UNIX programming, and that there are several different
> ports to DOS and OS/2, nevertheless, comments about the
> differences between perl on Unix and the other OS's would be of
> major help to a large body of perl users.

> Comments on how to emulate some of the UNIXisms on DOS and OS/2,
> despite their limitations, would be valuable wherever possible,
> particularly with respect to I/O and command such as system and
> exec etc. Notes as to what is not possible due to OS limitations
> would be equally valuable. Dito for the differences in globbing,
> metacharacters, quoting etc.

A couple of things you might want to know:  First, when Larry was
working on the book, the DOS versions of Perl were just beginning to
emerge and had very few users; they were also only semi-functional.
A lot of terrific work has been done, I think, in getting quite
useable DOS versions of Perl going (by Budi R. and others).  But that's
part of the reason for the lack of discussion of things DOS in the
camel book.

The second issue is tougher, though:  and that is, that Larry has
pretty much never *used* a DOS machine; I'm not sure Randal has either.
It's hard to talk about I/O differences etc. with regard to a system
one is basically totally unfamiliar with.  Better than a plea to
Larry and Randal might be a plea to those who actually *did* the DOS
or OS/2 ports to put together a good write-up along the lines you're
asking for, which might then be incorporated into another edition
of the book or at least into the on-line docs.

Not (this time) speaking for anyone but myself,

--Sharon Hopkins

----------------------------end response-------------------------

--
***************************************************************************

        Brooklyn, NY            *
                                *
        Disclaimer: The above is not necessarily MY opinion nor that
                                of anyone else :-)  ????!
****************************************************************************



Tue, 29 Aug 1995 16:02:53 GMT  
 Camel book for 5.0 and DOS.
Chaim>  The purpose of this post, is a plea to Larry and Randal to pay
Chaim>  more attention to perl on the various ports to DOS and OS/2 in the
Chaim>  next edition of the camel book, rather than the near total neglect
Chaim>  in the current edition.

Not surprising, given that neither of us spend much time at all with
the DOS.  In fact, the only commands I've ever typed in my life on a
(blech) DOS box are "DIR" and "CD".  It's hard to write about things
that you haven't directly experienced (although many tech manuals out
there are obviously the products of that).

The system V support is also weakly documented, because neither of us
had spent much time with System V (by choice :-).  But now that I'm
feeding a Solaris box and an NCR box for Intel, it's a little more
pertinent to know that.  (The question is, how little exposure can I
get to sysV before my video career takes off... :-)

I've been a Unix hacker since 1977.  To me, DOS is just a passing fad. :-)

print "Just another DOS hacker NOT!" && "Just another Perl hacker,"
--
Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095

phrase: "Welcome to Portland, Oregon ... home of the California Raisins!"



Tue, 29 Aug 1995 23:43:35 GMT  
 Camel book for 5.0 and DOS.

Quote:


>)
>)  The purpose of this post, is a plea to Larry and Randal to pay
>)  more attention to perl on the various ports to DOS and OS/2 in the
>)  next edition of the camel book, rather than the near total neglect
>)  in the current edition.

>While I agree that such information would be usefull, you can not
>expect Larry or Randal to try to document all of these differences.
>The only reason many differences exist is due to the poor organization
>of the DOS OS (if you can call it that).  And, the only reason the DOS
>ports exist is becuase someone else wanted them enough to hack the
>code to get ports to compile.

The real problem here is not the poor documentation for the DOS and OS/2
ports but rather their bootleg status.  At one time (arounnd 3.0) Larry and
I discussed trying to incorporate my DOS changes into the distribution.
But the breaks in our workloads never permitted it.  I stopped upgrading
my version at 4.019 and have no plans to go beyond that.

There can be no formal documentation of the non-Unix perls unless these
are standardized.  There are now at least two major MS-DOS versions
out there, and neither has been formally blessed.  My version is straight
MS-DOS, and generally does more things right with respect to subprocesses,
random numbers, etc., than it's competitor.  The other version is built
on DJ's GCC DOS-extender, and therefore runs in flat 32-bit mode.  It
doesn't get as many little things right, but it won't quickly run out of
memory, either.  (640K is precious little when you're trying to do something
complicated in perl.)

Quote:
>The DOS version of the of  PERL manual does document these
>differences.  It comes with Len Reed's port.  Furthermore, that manual
>has been converted to a Norton Guides database.  Len Reeds port, and
>the NG Manual can be found on SIMTEL and it's mirrors:
>pd1:<msdos.perl>
>perl419x.zip
>ngperl10.zip

It's true that I reworked the manual at 4.019: both a formatted DOS version
and the troff source are available.  With the latter you can print
a single mixed Unix/DOS manual.  But this manual covers only *my* DOS
port.

Is the SIMTEL zip file sound?  I've heard from some folks that it had
problems.  I recommend the zoo archives, as I packed them: they're
on ee.umanitoba.ca.
--
Len Reed
Holos Software, Inc.
Voice: (404) 496-1358



Wed, 30 Aug 1995 03:53:10 GMT  
 Camel book for 5.0 and DOS.

Quote:

> There can be no formal documentation of the non-Unix perls unless these
> are standardized.  There are now at least two major MS-DOS versions
> out there, and neither has been formally blessed.  My version is straight
> MS-DOS, and generally does more things right with respect to subprocesses,
> random numbers, etc., than it's competitor.  The other version is built
> on DJ's GCC DOS-extender, and therefore runs in flat 32-bit mode.  It
> doesn't get as many little things right, but it won't quickly run out of
> memory, either.  (640K is precious little when you're trying to do something
> complicated in perl.)

[ Here comes yet another unblessed, bootleg version. ]

     Just to muddy the waters even further, on Monday, I'll probably be
uploading to Simtel20 my 32-bit MSDOS version of perl 4pl36 (w/full
sources).  Unlike the GCC version, this version WILL run under Windows
3.1 (but you cannot spawn another copy of perl from an already-running
copy of perl, due to current limitations in the DOS extender).  It'll
use up to 32MB of RAM and will support virtual memory.  The perl
de{*filter*} does work, and GDBM 1.5 support has been added.  If anyone's
curious, the Watcom C/386 compiler was used.

     It also passes all of the tests that do not depend on Unix-isms.
While it isn't perfect (exec() and ioctl() don't work), it did manage to
crunch through a memory-hungry perl script of mine.

     -- Darryl Okahata

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.



Wed, 30 Aug 1995 07:31:43 GMT  
 Camel book for 5.0 and DOS.

Quote:
>      Just to muddy the waters even further, on Monday, I'll probably be
> uploading to Simtel20 my 32-bit MSDOS version of perl 4pl36 (w/full
> sources).  Unlike the GCC version, this version WILL run under Windows
> 3.1 (but you cannot spawn another copy of perl from an already-running
> copy of perl, due to current limitations in the DOS extender).  It'll

     It's now available from Simtel20, in pd1:<msdos.perl>:

        BPERL1X.ZIP     32-bit Perl 4.0pl36 w/VM & Win 3.1 supt. (exe)
        BPERL1S.ZIP     32-bit Perl 4.0pl36 w/VM & Win 3.1 supt. (src)

I've included the interesting parts of the README.DOS file at the end
of this message.

     -- Darryl Okahata

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.

-------------------------------------------------------------------------------
                               "BIGPERL"
                         Perl 4.0 patchlevel 36
                        Mon Mar 15 00:36:19 1993

                        (Compuserve: 75206,3074)

     This version of Perl 4.0 has been compiled using the WATCOM C/386
compiler, which generates flat, 32-bit code that runs under MSDOS and
Windows (with some limitations -- see below).

The requirements, features, and problems of this version are:

* A 386 or 486 is required.  This version will NOT work with anything else.

* 4MB or more of RAM is required.

* It is strongly recommended that a memory management program like
  HIMEM/EMM386 or QEMM be used.  NOTE: machines with 64MB or more RAM
  should use use either QEMM or no memory manager; supposedly, on these
  machines, HIMEM/EMM386 and the dos extender (used for this version of
  perl) do not work well together.

* Large amounts of memory is supported.  This version of perl will use
  up to 32MB of memory.

* Virtual memory is supported.  By using a swapfile on your hard disk,
  this version can still access up to 32MB of memory, even though you
  may not have this much physical RAM.  However, you must explicitly
  enable virtual memory by setting an enviroment variable (see the
  section called, "The DOS/4GW DOS extender", for more details).

* This version will work under Windows 3.1.  However, inside Windows,
  perl cannot spawn another copy of perl; this can be done outside of
  Windows.

* The size of the stack is fixed at 128K.  To change this requires
  relinking perl.

* This version does not support entering scripts on the command line via
  the -e option.  While nothing has been done to prevent it, the MSDOS
  128-byte command-line-length limitation and the fact that MSDOS shells
  do not suport quoted arguments will probably frustrate any attempts at
  using -e.

* The distributed perlglob.exe will perform filename globbing on
  directories.  For example:


  will return a SORTED list of all normal+directory files.  Hidden &
  system files will not be returned.

* The perl de{*filter*} works.

* The exec() and ioctl() functions are not supported.  The exec()
  function is not supported because the DOS extender doesn't support it,
  and ioctl() is not supported because of problems translating data
  structures between real and protected modes.

* To avoid a bug in perl or the DOS extender, this version of perl turns
  control-break checking off (it does the equivalent of typing "break
  off" at the DOS prompt).  This was done because pressing Ctrl-C or
  Ctrl-Break very rapidly while perl is running would crash the system
  (pressing it only once would work, but pressing it rapidly would cause
  a crash).  The problem with this is that this version of perl can now
  only be interrupted while it is doing console I/O.  I don't know if
  this will ever be fixed.

  Note that the original state of the control-break checking flag is
  saved at startup, and will be restored if perl terminates normally
  (pressing control-break will NOT cause the original state to be
  restored, however).

* The perl library files (in perl-4.036/lib/*.*) have not been tested.
  They may or may not work with MSDOS.

* Because many MSDOS shells treat "/" as the beginning of an option,
  MSDOS perl scripts will have to use the "\" character in paths to
  commands.  For example, the following will not work:

        system("./perl");

  This fails because MSDOS tries to execute the command "." with the
  option "/perl".  Instead, you must specify:

        system(".\\perl");

  Disgusting, but true.

* The default location for the perl library support files is
  "c:\perl\lib".  This can be changed through the use of the PERLLIB
  environment variable, or by recompiling perl.

* A formatted version of the perl manual is stored in the file
  "perlman.txt".

* This version of perl says that it is version "4.0M1".  This was done
  to provide a means of identifying which MSDOS version of perl this is.
  [ Ideally, I would have liked to have said that this is "patchlevel
  36a", but the code doesn't readily support this. ]

* The a2p and s2p programs have NOT been ported.

*******************************************************************************
***** Here is a list of perl regression tests in Perl 4.0 pl36, and
      whether or not they pass.

     Note: there is a perl script, called "t/test.dos", that runs all
tests that are known to pass 100% (which is 60-70% of the tests).

===============================================================================
base/cond.t     -- Passes
base/if.t       -- Passes
base/lex.t      -- Mostly passes.  There is a single failure (test #12), due
                   to differences between Unix and MSDOS.  (Under Unix, 'sh
                   -c "echo ok 12\n"' produces only one line of output.  Two
                   lines are output with MSDOS.)
base/pat.t      -- Passes
base/term.t     -- Passes, if references to "/dev/null" are changed to "nul".
cmd/elsif.t     -- Passes
cmd/for.t       -- Passes
cmd/mod.t       -- Passes
cmd/subval.t    -- Passes
cmd/switch.t    -- Passes
cmd/while.t     -- Passes, if references to the file "Cmd.while.tmp" are
                   changed to reference "Cmd_while.tmp".
comp/cmdopt.t   -- Passes
comp/cpp.t      -- Fails (cpp is not implemented)
comp/decl.t     -- Passes
comp/multilin.t -- Passes, if references to "rm" and "cat" are changed to
                   "del" and "type".
comp/package.t  -- Passes
comp/script.t   -- Fails, due to differences between Unix and MSDOS.
                   (Testing under MSDOS would require adding code to properly
                   parse quoted command-line arguments.)
comp/term.t     -- Passes
io/argv.t       -- Fails, due to differences between Unix and MSDOS.
                   (Testing under MSDOS would require adding code to properly
                   parse quoted command-line arguments.)
io/dup.t        -- Mostly passes.  Test #5 fails because MSDOS can't handle
                   redirection of stderr.
io/fs.t         -- Fails, due to differences between Unix and MSDOS.
                   (Unix has the concept of a multiple file access
                   permissions: user, group, other.  MSDOS has no such
                   concepts.)
io/inplace.t    -- Not tested.
io/pipe.t       -- Fails.  Needs a working exec(), which is not supported
                   with this version of MSDOS perl.
io/print.t      -- Passes
io/tell.t       -- Passes
lib/big.t       -- Passes
op/append.t     -- Passes
op/array.t      -- Passes
op/auto.t       -- Passes
op/chop.t       -- Passes
op/cond.t       -- Passes
op/dbm.t        -- Mostly passes with GNU dbm, if the following is done:
                        1. At the beginning of the test, the lines that test
                           to see if /usr/include/dbm.h or /usr/include/ndbm.h
                           exist are deleted.
                        2. References to the file "Op.dbmx" are changed to
                           "Op_dbmx".
                        3. References to the file "Op.dbmx.pag" are changed to
                           "Op_dbmx".
                   Test #2 fails due to file permission differences between
                   Unix and MSDOS.
op/delete.t     -- Passes
op/do.t         -- Passes
op/each.t       -- Passes
op/eval.t       -- Passes
op/exec.t       -- Fails (exec() not implemented)
op/exp.t        -- Passes
op/flip.t       -- Passes
op/fork.t       -- Fails (fork() not implemented)
op/glob.t       -- Passes, if a patch is applied to glob.t (this patch is
                   listed at the end of this list).  This patch may be
                   questionable.
op/goto.t       -- Mostly passes.  Test #3 fails due to differences between
                   Unix and MSDOS.  (Testing under MSDOS would require
                   adding code to properly parse quoted command-line
                   arguments.)
op/groups.t     -- Fails.  MSDOS has no concept of "groups".
op/index.t      -- Passes
op/int.t        -- Passes
op/join.t       -- Passes
op/list.t       -- Passes
op/local.t      -- Passes
op/magic.t      -- Fails, due to differences between Unix and MSDOS.
                   (Testing under MSDOS would require adding code to
                   properly parse quoted command-line arguments.)
op/mkdir.t      -- Mostly passes.  Parts fail due to different error
                   messages output by Unix and MSDOS.
op/oct.t        -- Passes
op/ord.t        -- Passes
op/pack.t       -- Passes
op/pat.t        -- Passes
op/push.t       -- Passes
op/range.t      -- Passes
op/read.t       -- Passes
op/readdir.t    -- Passes
op/regexp.t     -- Passes
op/repeat.t     -- Passes
op/s.t          -- Passes
op/sleep.t      -- Passes
op/sort.t       -- Passes
op/split.t      -- Mostly passes.  Test #11 fails due to differences between
                   Unix and MSDOS.  (Testing under MSDOS would require
                   adding code to properly parse quoted command-line
                   arguments.)
op/sprintf.t    -- Passes
op/stat.t       -- Fails (contains numerous Unix-isms, like "ls -l /dev",
                   "/usr/bin", "/dev/null", "/dev/tty", etc.)
op/study.t      -- Passes
op/substr.t     -- Passes
op/time.t       -- Fails ("times" not implemented)
op/undef.t      -- Passes
op/unshift.t    -- Passes
op/vec.t        -- Passes
op/write.t      -- Passes

===============================================================================
Patch for op/glob.t (already applied to op/glob.t -- it is reproduced here so
that you can see what was changed):
-------------------------------------------------------------------------------
*** glob.old    Thu Jun 11 22:43:38 1992
--- glob.t      Sun Mar 07 23:30:56 1993
***************
*** 4,19 ****

  print "1..4\n";


! chop($otherway = `echo op/*`);

! print ...

read more »



Thu, 07 Sep 1995 01:11:04 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Perl 5.0 and the new camel book

2. Wanted Camel Book for Perl4

3. Camel book reference card online?

4. Camel book source code available online somewhere?

5. PROBLEM: From Camel Book

6. The Camel Book

7. FAQ: Llama or the Camel Book?

8. I got a Camel Book!!!

9. "The Camel Book"

10. socket problem with server/client from Perl Camel book on Sun Solaris 2.5.1 box

11. Camel book?

12. client/server from Camel book breaks

 

 
Powered by phpBB® Forum Software