Switch branches/tags
Commits on Mar 21, 1991
  1. perl 4.0.00: (no release announcement available)

    Larry Wall
    Larry Wall committed Mar 21, 1991
    So far, 4.0 is still a beta test version.  For the last production
    version, look in pub/perl.3.0/kits@44.
Commits on Jan 11, 1991
  1. perl 3.0 patch #44 patch #42, continued

    Larry Wall
    Larry Wall committed Jan 11, 1991
    See patch #42.
  2. perl 3.0 patch #43 patch #42, continued

    Larry Wall
    Larry Wall committed Jan 11, 1991
    See patch #42.
  3. perl 3.0 patch #42 (combined patch)

    Larry Wall
    Larry Wall committed Jan 11, 1991
    Most of these patches are pretty self-explanatory.  Much of this
    is random cleanup in preparation for version 4.0, so I won't talk
    about it here.  A couple of things should be noted, however.
    First, there's a new -0 option that allows you to specify (in octal)
    the initial value of $/, the record separator.  It's primarily
    intended for use with versions of find that support -print0 to
    delimit filenames with nulls, but it's more general than that:
    paragraph mode
    file slurp mode
    This feature is so new that it didn't even make it into the book.
    The other major item is that different patchlevels of perl can
    now coexist in your bin directory.  The names "perl" and "taintperl"
    are just links to "perl3.044" and "tperl3.044".  This has several
    benefits.  The perl3.044 invokes the corresponding tperl3.044 rather
    than taintperl, so it always runs the correct version.  Second, you can
    "freeze" a script by putting a #! line referring to a version that
    it is known to work with.  Third, you can put a new version out
    there to try out before making it the default perl.  Lastly, it
    sells more disk drives.   :-)
    Barring catastrophe, this will likely be the last patch before
    version 4.0 comes out.
Commits on Nov 13, 1990
  1. perl 3.0 patch #41 (combined patch)

    Larry Wall
    Larry Wall committed Nov 13, 1990
    Here's the requisite dinky patch to fix the problems of the
    preceding large set of patches.  In this case, a couple of
    malloc/free problems--one of which involved overrunning the end
    of an allocated string, and the other of which involved freeing
    with invalid pointers.  (There was also a bug in there involving
    variable magicalness propagating incorrectly, which resulting in
    a dbm anomoly.)
    I updated README to mention that dnix needs to avoid -O.
    I added the hp malloc union overhead strut that Jan Dr{rv posted.
    (Eventually this should be determined by Configure, but laziness
    has its advantages.)
Commits on Nov 9, 1990
  1. perl 3.0 patch #40 patch #38, continued

    Larry Wall
    Larry Wall committed Nov 9, 1990
    See patch #38.
  2. perl 3.0 patch #39 patch #38, continued

    Larry Wall
    Larry Wall committed Nov 9, 1990
    See patch #38.
  3. perl 3.0 patch #38 (combined patch)

    Larry Wall
    Larry Wall committed Nov 9, 1990
    Forget the description, it's too late at night...
Commits on Oct 19, 1990
  1. perl 3.0 patch #37 (combined patch)

    Larry Wall
    Larry Wall committed Oct 19, 1990
    I tried to take the strlen of an integer on systems without wait4()
    or waitpid().  For some reason this didn't work too well...
    In hash.c there was a call to dbm_nextkey() which needed to be
    ifdefed on old dbm systems.
    A pattern such as /foo.*bar$/ was wrongly optimized to do
    tail matching on "foo".  This was a longstanding bug that
    was unmasked by patch 36.
    Some systems have some SYS V IPC but not all of it.  Configure
    now figures this out.
    Patch 36 put the user's PATH in front of Configures, but to make
    it work right I needed to change all calls of loc to ./loc in
    $cryptlib needed to be mentioned in the Makefile.
    Apollo 10.3 and Sun 3.5 have some compilation problems, so I
    mentioned them in README.
    Cray has weird restrictions on setjmp locations--you can't say
    if (result = setjmp(...))
    Random typos and cleanup.
Commits on Oct 16, 1990
  1. perl 3.0 patch #32 patch #29, continued

    Larry Wall
    Larry Wall committed Oct 16, 1990
    See patch #29.
  2. perl 3.0 patch #31 patch #29, continued

    Larry Wall
    Larry Wall committed Oct 16, 1990
    See patch #29.
Commits on Oct 15, 1990
  1. perl 3.0 patch #36 patch #29, continued

    Larry Wall
    Larry Wall committed Oct 15, 1990
    See patch #29.
  2. perl 3.0 patch #35 patch #29, continued

    Larry Wall
    Larry Wall committed Oct 15, 1990
    See patch #29.
  3. perl 3.0 patch #34 patch #29, continued

    Larry Wall
    Larry Wall committed Oct 15, 1990
    See patch #29.
  4. perl 3.0 patch #33 patch #29, continued

    Larry Wall
    Larry Wall committed Oct 15, 1990
    See patch #29.
  5. perl 3.0 patch #30 patch #29, continued

    Larry Wall
    Larry Wall committed Oct 15, 1990
    See patch #29.
  6. perl 3.0 patch #29 (combined patch)

    Larry Wall
    Larry Wall committed Oct 15, 1990
    This set of patches pretty much brings you up to the functionality
    that version 4.0 will have.  The Perl Book documents version 4.0.
    Perhaps these should be called release notes...   :-)
    Many of the changes relate to making the debugger work better.
    It now runs your scripts at nearly full speed because it no longer
    calls a subroutine on every statement.  The debugger now doesn't
    get confused about packages, evals and other filenames.  More
    variables (though still not all) are available within the debugger.
    Related to this is the fact that every statement now knows which
    package and filename it was compiled in, so package semantics are
    now much more straightforward.  Every variable also knows which
    package it was compiled in.  So many places that used to print
    out just the variable name now prefix the variable name with the
    package name.  Notably, if you print *foo it now gives *package'foo.
    Along with these, there is now a "caller" function which returns
    the context of the current subroutine call.  See the man page for
    more details.
    Chip Salzenberg sent the patches for System V IPC (msg, sem and shm)
    so I dropped them in.
    There was no way to wait for a specific pid, which was silly, since
    Perl was already keeping track of the information.  So I added
    the waitpid() call, which uses Unix's wait4() or waitpid() if
    available, and otherwise emulates them (at least as far as letting
    you wait for a particular pid--it doesn't emulate non-blocking wait).
    For use in sorting routines, there are now two new operators,
    cmp and <=>.  These do string and numeric comparison, returning
    -1, 0 or 1 when the first argument is less than, equal to or
    greater than the second argument.
    Occasionally one finds that one wants to evaluate an operator in
    a scalar context, even though it's part of a LIST.  For this purpose,
    there is now a scalar() operator.  For instance, the approved
    fix for the novice error of using <> in assigning to a local is now:
    local($var) = scalar(<STDIN>);
    Perl's ordinary I/O is done using standard I/O routines.  Every
    now and then this gets in your way.  You may now access the system
    calls read() and write() via the Perl functions sysread() and
    syswrite().  They should not be intermixed with ordinary I/O calls
    unless you know what you're doing.
    Along with this, both the sysread() and read() functions allow you
    an optional 4th argument giving an offset into the string you're
    reading into, so for instance you can easily finish up partial reads.
    As a bit of syntactic sugar, you can now use the file tests -M, -A
    and -C to determine the age of a file in (possibly fractional) days
    as of the time the script started running.  This makes it much
    easier to write midnight cleanup scripts with precision.
    The index() and rindex() functions now have an optional 3rd argument
    which tells it where to start looking, so you can now iterate through
    a string using these functions.
    The substr() function's 3rd argument is now optional, and if omitted,
    the function returns everything to the end of the string.
    The tr/// translation function now understands c, d and s options, just
    like the tr program.  (Well, almost just like.  The d option only
    deletes characters that aren't in the replacement string.)  The
    c complementes the character class to match and the s option squishes
    out multiple occurrences of any replacement class characters.
    The reverse function, used in a scalar context, now reverses its
    scalar argument as a string.
    Dale Worley posted a patch to add @###.## type fields to formats.
    I said, "Neat!" and dropped it in, lock, stock and sinker.
    Kai Uwe Rommel sent a bunch of MSDOS and OS/2 updates, which I (mostly)
    incorporated.  I can't vouch for them, but they look okay.
    Any data stored after the __END__ marker can be accesses now via
    the DATA filehandle, which is automatically opened onto the script
    at that point.  (Well, actually, it's just kept open, since it
    was already open to read the script.)
    The taintperl program now checks for world writable PATH components,
    and complains if any are found (if PATH is used).
        Bug fixes:
    It used to be that you could get core dumps by such means as
        $#foo = 50;
        foreach $elem (@foo) {
    $elem = 1;
    This is no longer so.  (For those who are up on Perl internals, the
    stack policy no longer allows Nullstr--all undefined values must
    be passed as &str_undef.)
    If you say something like
    local($initialized,$foo,$bar) = ('one value');
    $foo and $bar are now initialized to the undefined value, rather
    than the defined null string.
    Array assignment to special arrays is now better supported.  For
    instance, @ENV = () clears the environment, and %foo = () will
    now clear any dbm file bound to %foo.
    On the subject of dbm files, the highly visible bugs at patchlevel
    28 have been fixed.  You can now open dbm files readonly, and you
    don't have to do a dummy assignment to make the cache allocate itself.
    The modulus operator wasn't working right on negative values because
    of a misplaced cast.  For instance, -5 % 5 was returning
    the value 5, which is clearly wrong.
    Certain operations coredumped if you didn't supply a value:
    Previously, if the subroutine supplied for a sort operation didn't
    exist, it failed quietly.  Now it produces a fatal error.
    The bitwise complement operator ~ didn't work on vec() strings longer
    than one byte because of failure to increment a loop variable.
    The oct and hex functions returned a negative result if the highest
    bit was set.  They now return an unsigned result, which seems a
    little less confusing.  Likewise, the token 0x80000000 also produces
    an unsigned value now.
    Some machines didn't like to see 0x87654321 in an #ifdef because
    they think of the symbols as signed.  The tests have been changed
    to just look at the lower 4 nybbles of the value, which is sufficient
    to determine endianness, at least as far as the #ifdefs are concerned.
    The unshift operator did not return the documented value, which
    was the number of elements in the new array.  Instead it returned
    the last unshifted argument, more or less by accident.
    -w sometimes printed spurious warnings about ARGV and ENV when
    referencing the arrays indirectly through shift or exec.  This
    was because the typo test was misplaced before the code that
    exempts special variables from the typo test.
    If you said 'require "./"', it would look in someplace like
    /usr/local/lib/perl/./ instead of the current directory.  This
    works more like people expect now.  The require error messages also
    referred to wrong file, if they worked at all.
    The h2ph program didn't translate includes right--it should have
    changed .h to .ph.
    Patterns with multiple short literal strings sometimes failed.
    This was a problem with the code that looks for a maximal literal
    string to feed to the Boyer-Moore searching routine.  The code
    was gluing together literal strings that weren't continuous.
    The $* variable controls multi-line pattern matching.  When it's
    0, patterns are supposed to match as if the string contained a
    single line.  Unfortunately, /^pat/ occasionally matched in middle
    of string under certain conditions.
    Recently the regular expression routines were upgraded to do
    {n,m} more efficiently.  In doing this, however, I manufactured
    a couple of bugs: /.{n,m}$/ could match with fewer than n characters
    remaining on the line, and patterns like /\d{9}/ could match more
    than 9 characters.
    The undefined value has an actual physical location in Perl, and
    pointers to it are passed around.  By certain circuitous routes
    it was possible to clobber the undefined value so that it
    was no longer undefined--kind of like making /dev/null into
    a real file.  Hopefully this can't happen any more.
    op.stat could fail if /bin/0 existed, because of a while (<*>) {...
    This has been changed to a while (defined($_ = <*>)) {...
    The length of a search pattern was limited by the length of
    tokenbuf internally.  This restriction has been removed.
    The null character gave the tokener indigestion when used as
    a delimiter for m// or s///.
    There was a bunch of other cleanupish things that are too trivial
    to mention here.
Commits on Aug 13, 1990
  1. perl 3.0 patch #28 (combined patch)

    Larry Wall
    Larry Wall committed Aug 13, 1990
    Certain systems, notable Ultrix, set the close-on-exec flag
    by default on dup'ed file descriptors.  This is anti-social
    when you're creating a new STDOUT.  The flag is now forced
    off for STDIN, STDOUT and STDERR.
    Some yaccs report 29 shift/reduce conflicts and 59 reduce/reduce
    conflicts, while other yaccs and bison report 27 and 61.  The
    Makefile now says to expect either thing.  I'm not sure if there's
    a bug lurking there somewhere.
    The defined(@array) and defined(%array) ended up defining
    the arrays they were trying to determine the status of.  Oops.
    Using the status of NSIG to determine whether <signal.h> had
    been included didn't work right on Xenix.  A fix seems to be
    beyond Configure at the moment, so we've got some OS dependent
    #ifdefs in there.
    There were some syntax errors in the new code to determine whether
    it is safe to emulate rename() with unlink/link/unlink.  Obviously
    heavily tested code...  :-)
    Patch 27 introduced the possibility of using identifiers as
    unquoted strings, but the code to warn against the use of
    totally lowercase identifiers looped infinitely.
    I documented that you can't interpolate $) or $| in pattern.
    It was actually implied under s///, but it should have been
    more explicit.
    Patterns with {m} rather than {m,n} didn't work right.
    Tests io.fs and op.stat had difficulties under AFS.  They now
    ignore the tests in question if they think they're running under
    The shift/reduce expectation message was off for a2p's Makefile.
Commits on Aug 8, 1990
  1. perl 3.0 patch #27 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  2. perl 3.0 patch #26 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  3. perl 3.0 patch #25 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  4. perl 3.0 patch #24 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  5. perl 3.0 patch #23 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  6. perl 3.0 patch #22 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  7. perl 3.0 patch #21 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  8. perl 3.0 patch #20 patch #19, continued

    Larry Wall
    Larry Wall committed Aug 8, 1990
    See patch #19.
  9. perl 3.0 patch #19 (combined patch)

    Larry Wall
    Larry Wall committed Aug 8, 1990
    You now have the capability of linking C subroutines into a
    special version of perl.  See the files in usub/ for an example.
    There is now an operator to include library modules with duplicate
    suppression and error checking, called "require".  (makelib has been
    renamed to h2ph, and Tom Christiansen's h2pl stuff has been included
    too.  Perl .h files are now called .ph files to avoid confusion.)
    It's now possible to truncate files if your machines supports any
    of ftruncate(fd, size), chsize(fd, size) or fcntl(fd, F_FREESP, size).
    Added -c switch to do compilation only, that is, to suppress
    execution.  Useful in combination with -D1024.
    There's now a -x switch to extract a script from the input stream
    so you can pipe articles containing Perl scripts directly into perl.
    Previously, the only places you could use bare words in Perl were as
    filehandles or labels.  You can now put bare words (identifiers)
    anywhere.  If they have no interpretation as filehandles or labels,
    they will be treated as if they had single quotes around them.
    This works together nicely with the fact that you can use a
    symbol name indirectly as a filehandle or to assign to *name.
    It basically means you can write subroutines and pass filehandles
    without quoting or *-ing them.  (It also means the grammar is even
    more ambiguous now--59 reduce/reduce conflicts!!!  But it seems
    to do the Right Thing.)
    Added __LINE__ and __FILE__ tokens to let you interpolate the
    current line number or filename, such as in a call to an error
    routine, or to help you translate eval linenumbers to real
    Added __END__ token to let you mark the end of the program in
    the input stream.  (^D and ^Z are allowed synonyms.)  Program text
    and data can now both come from STDIN.
    `command` in array context now returns array of lines.  Previously
    it would return a single element array holding all the lines.
    An empty %array now returns 0 in scalar context so that you can
    use it profitably in a conditional:  &blurfl if %seen;
    The include search path (@INC) now includes . explicity at the
    end, so you can change it if you wish.  Library routines now
    have precedence by default.
    Several pattern matching optimizations: I sped up /x+y/ patterns
    greatly by not retrying on every x, and disabled backoff on
    patterns anchored to the end like /\s+$/.  This made /\s+$/ run
    100 times faster on a string containing 70 spaces followed by an X.
    Actual improvements will generally be less than that.  I also
    sped up {m,n} on simple items by making it a variant of *.
    And /.*whatever/ is now optimizaed to /^.*whatever/ to avoid
    retrying at every position in the event of failure.  I fixed
    character classes to allow backslashing hyphen, by popular
    In the past, $ in a pattern would sometimes match in the middle
    of the string and sometimes not, if $* == 0.  Now it will never
    match except at the end of the string, or just before a terminating
    newline.  When $* == 1 behavior is as before.
    In the README file, I've expanded on just how I think the GNU
    General Public License applies to Perl and to things you might
    want to do with Perl.
    The interpreter used to set the global variable "line" to be
    the current line number.  Instead, it now sets a global pointer
    to the current Perl statement, which is no more overhead, but
    now we will have access to the file name and package name associated
    with that statement, so that the debugger soon be upgraded to
    allow debugging of evals and packages.
    In the past, a conditional construct in an array context passed
    the array context on to the conditional expression, causing
    general consternation and confusion.  Conditionals now always
    supply a scalar context to the expression, and if that expression
    turns out to be the one whose value is returned, the value is
    coerced to an array value of one element.
    The switch optimizer was confused by negative fractional values,
    and truncating them the wrong direction.
    Configure now checks for chsize, select and truncate functions, and
    now asks if you want to put scripts into some separate directory
    from your binaries.  More and more people are establishing a common
    directory across architectures for scripts, so this is getting
    It used to be that a numeric literal ended up being stored both
    as a string and as a double.  This could make for lots of wasted
    storage if you said things like "$seen{$key} = 1;".  So now
    numeric literals are now stored only in floating point format,
    which saves space, and generates at most one extra conversion per
    literal over the life of the script.
    The % operator had an off-by-one error if the left argument was
    The pack and unpack functions have been upgraded.  You
    can now convert native float and double fields using f and d.
    You can specify negative relative positions with X<n>, and absolute
    positions in the record with @<n>.  You can have a length of *
    on the final field to indicate that it is to gobble all the rest
    of the available fields.  In unpack, if you precede a field
    spec with %<n>, it does an n-bit checksum on it instead of the
    value itself.  (Thus "%16C*" will checksum just like the Sys V sum
    program.)  One totally wacked out evening I hacked a u format
    in to pack and unpack uudecode-style strings.
    A couple bugs were fixed in unpack--it couldn't unpack an A or a
    format field in a scalar context, which is just supposed to
    return the first field.  The c and C formats were also calling
    bcopy to copy each character.  Yuck.
    Machines without the setreuid() system call couldn't manipulate
    $< and $> easily.  Now, if you've got setuid(), you can say $< = $>
    or $> = $< or even ($<, $>) = ($uid, $uid), as long as it's
    something that can be done with setuid().  Similarly for setgid().
    I've included various MSDOS and OS/2 patches that people have sent.
    There's still more in the hopper...
    An open on a pipe for output such as 'open(STDOUT,"|command")' left
    STDOUT attached to the wrong file descriptor.  This didn't matter
    within Perl, but it made subprocesses expecting stdout to be on fd 1
    rather irate.
    The print command could fail to detect errors such as running out
    room on the disk.  Now it checks a little better.
    Saying "print @foo" might only print out some of the elements
    if there undefined elements in the middle of the array, due to
    a reversed bit of logic in the print routine.
    On machines with vfork the child process would allocate memory
    in the parent without the parent knowing about it, or having any way
    to free the memory so allocated.  The parent now calls a cleanup
    routine that knows whether that's what happened.
    If the getsockname or getpeername functions returned a normal
    Unix error, perl -w would report that you tried I/O on an
    unopened socket, even though it was open.
    MACH doesn't have seekdir or telldir.  Who ever uses them anyway?
    Under certain circumstances, an optimized pattern match could
    pass a hint into the standard pattern matching routine which
    the standard routine would then ignore.  The next pattern match
    after that would then get a "panic: hint in do_match" because the
    hint didn't point into the current string of interest.
    The $' variable returned a short string if it contained an
    embedded null.
    Two common split cases are now special-cased to avoid the regular
    expression code.  One is /\s+/ (and its cousin ' ', which also
    trims leading whitespace).  The other is /^/, which is very useful
    for splitting a "here-is" quote into lines:
    @lines = split(/^/, <<END);
    Element 0
    Element 1
    Element 2
    You couldn't split on a single case-insensitive letter because
    the single character split optimization ignore the case folding
    Sort now handles undefined strings right, and sorts lists
    a little more efficiently because it weeds them out before
    sorting so it doesn't have to check for them on every comparison.
    The each() and keys() functions were returning garbage on null
    keys in DBM files because the DBM iterator merely returns a pointer
    into the buffer to a string that's not necessarily null terminated.
    Internally, Perl keeps a null at the end of every string (though
    allowing embedded nulls) and some routines make use of this
    to avoid checking for the end of buffer on every comparison.  So
    this just needed to be treated as a special case.
    The &, | and ^ operators will do bitwise operations on two strings,
    but for some reason I hadn't implemented ~ to do a complement.
    Using an associative array name with a % in dbmopen(%name...)
    didn't work right, not because it didn't parse, but because the
    dbm opening routine internally did the wrong thing with it.
    You can now say dbmopen(name, 'filename', undef) to prevent it
    from opening the dbm file if it doesn't exist.
    The die operator simply exited if you didn't give an argument,
    because that made sense before eval existed.  But now it will be
    equivalent to "die 'Died';".
    Using the return function outside a subroutine returned a cryptic
    message about not being able to pop a magical label off the stack.
    It's now more informative.
    On systems without the rename() system call, it's emulated with
    unlink()/link()/unlink(), which could clobber a file if it
    happened to unlink it before it linked it.  Perl now checks to
    make sure the source and destination filenames aren't in fact
    the same directory entry.
    The -s file test now returns size of file.  Why not?
    If you tried to write a general subroutine to open files, passing
    in the filehandle as *filehandle, it didn't work because nobody
    took responsibility to allocate the filehandle structure internally.
    Now, passing *name to subroutine forces filehandle and array
    creation on that symbol if they're already not created.
    Reading input via <HANDLE> is now a little more efficient--it
    does one less string copy.
    The routine now fixes weird chars to be printable, and
    allows you to specify a list of varables to display.  The debugger
    takes advantage of this.  The debugger also now allows \ continuation
    lines, and has an = command to let you make aliases easily.  Line
    numbers should now be correct even after lines containing only
    a semicolon.
    The action code for parsing split; with no arguments didn't
    pass correct a corrent value of bufend to the scanpat it was
    using to establish the /\s+/ pattern.
    The $] variable returned the rcsid string and patchlevel.  It still
    returns that in a string context, but in a numeric context it
    returns the version number (as in 4.0) + patchlevel / 1000.
    So these patches are being applied to 3.018.
    The variables $0, %ENV, @ARGV were retaining incorrect information
    from the previous incarnation in dumped/undumped scripts.
    The %ENV array is suppose to be global even inside packages, but
    and off-by-one error kept it from being so.
    The $| variable couldn't be set on a filehandle before the file
    was opened.  Now you can.
    If errno == 0, the $! variable returned "Error 0" in a string
    context, which is, unfortunately, a true string.  It now returns ""
    in string context if errno == 0, so you can use it reasonable in
    a conditional without comparing it to 0:  &cleanup if $!;
    On some machines, conversion of a number to a string caused
    a malloc string to be overrun by 1 character.  More memory is
    now allocated for such a string.
    The tainting mechanism didn't work right on scripts that were setgid
    but not setuid.
    If you had reference to an array such as @name in a program, but
    didn't invoke any of the usual array operations, the array never
    got initialized.
    The FPS compiler doesn't do default in a switch very well if the
    value can be interpreted as a signed character.  There's now a 
    #ifdef BADSWITCH for such machines.
    Certain combinations of backslashed backslashes weren't correctly
    parsed inside double-quoted strings.
    "Here" strings caused warnings about uninitialized variables because
    the string used internally to accumulate the lines wasn't initialized
    according to the standards of the -w switch.
    The a2p translator couldn't parse {foo = (bar == 123)} due to
    a hangover from the old awk syntax.  It also needed to put a
    chop into a program if the program referenced NF so that the
    field count would come out right when the split was done.
    There was a missing semicolon when local($_) was emitted.
    I also didn't realize that an explicity awk split on ' ' trims
    leading whitespace just like the implicit split at the beginning
    of the loop.  The awk loop has to be translated in one
    of two ways in a2p, depending on whether the array was produced
    by a split or by subscripting.  If the array was a normal array,
    a2p put out code that iterated over the array values rather than
    the numeric indexes, which was wrong.
    The s2p didn't translate \n correctly, stripping the backslash.
Commits on Mar 27, 1990
  1. perl 3.0 patch #18 patch #16, continued

    Larry Wall
    Larry Wall committed Mar 27, 1990
    See patch #16.
  2. perl 3.0 patch #17 patch #16, continued

    Larry Wall
    Larry Wall committed Mar 27, 1990
    See patch #16.
  3. perl 3.0 patch #16 (combined patch)

    Larry Wall
    Larry Wall committed Mar 27, 1990
    There is now support for compiling perl under the Microsoft C
    compiler on MSDOS.  Special thanks go to Diomidis Spinellis
    <> for this.  To compile under MSDOS, look at the
    readme file in the msdos subdirectory.
    As a part of this, six files will be renamed when you run
    Configure.  These are config.h.SH,[1-4] and t/op.subst.
    Suns (and perhaps other machines) can't cast negative floating
    point numbers to unsigned ints reasonably.  Configure now detects
    this and takes appropriate action.
    Configure looked for optional libraries but then didn't ever use
    them, even if there was no value to override.
    System V Release 4 provides us with yet another nm format for
    Configure to parse.  No doubt it's "better".  Sigh.
    MIPS CPUs running under Ultrix were getting configured for volatile
    support, but they don't like volatile when applied to a type generated
    by a typedef.  Configure now tests for this.
    I've added two new perl library routines: from
    Waldemar Kebsch and Marion Hakanson, and from Tom
    Christiansen and me.
    In subroutines, non-terminal blocks should never have arrays
    requested of them, even if the subroutine call's context is
    looking for an array.
    Formats didn't work inside eval.  Now they do.
    Any $foo++ that doesn't return a value is now optimized to ++$foo
    since the latter doesn't require generation of a temporary to hold
    the old value.
    A self-referential printf pattern such as sprintf($s,...,$s,...)
    would end up with a null as the first character of the next field.
    On machines that don't support executing scripts in the kernel,
    perl has to emulate that when an exec fails.  In this case,
    the do_exec() routine can lose arguments passed to the script.
    A memory leakage in pattern matching triggered by use of $`, $& or $' 
    has been fixed.
    A splice that pulls up the front of an array such as splice(@array,0,$n)
    can cause a duplicate free error.
    The grep operator blew up on undefined array values.  It now handles
    them reasonably, setting $_ to undef.
    The .. operator in an array context is used to generate number
    ranges.  This has been generalized to allow any string ranges that
    can be generated with the magical increment code of ++.  So
    you can say 'a' .. 'f', '000'..'999', etc.
    The ioctl function didn't return non-zero values correctly.
    Associative array slices from dbm files like @dbmvalues{'foo','bar'}
    could use the same cache entry for multiple values, causing loss of
    some of the values of the slice.  Cache values are now not flushed
    until the end of a statement.
    The do FILE operator blew up when used inside an eval, due to trying
    to free the eval code it was still executing.
    If you did s/^prefix// on a string, and subsequently assigned a
    value that didn't contain a string value to the string, you could
    get a bad free error.
    One of the taint checks blew up on undefined array elements, which
    showed up only when taintperl was run.
    The final semicolon in program is supposed to be optional now.
    Unfortunately this wasn't true when -p or -n added extra code
    around your code.  Now it's true all the time.
    A tail anchored pattern such as /foo$/ could cause grief if you
    searched a string that was shorter than that.
Commits on Mar 13, 1990
  1. perl 3.0 patch #15 (combined patch)

    Larry Wall
    Larry Wall committed Mar 13, 1990
    In patch 13, there was a fix to make the VAR=value construct
    in a command force interpretation by the shell.  This was botched,
    causing an argv list to be occasionally allocated with too small
    a size.  This problem is hidden on some machines because of
    BSD malloc's semantics.
    The lib/ file was missing final 1; which made it
    difficult to tell if it loaded right.
    The lib/ Tgetent subroutine didn't interpret ^x right
    due to a missing ord().
    In the section of the man page that gives hints for C programmers,
    it falsely declared that you can't subscript array values.  As of
    patch 13, this statement is "inoperative".
    The t/op.sleep test assumed that a sleep of 2 seconds would always
    return a value of 2 seconds slept.  Depending on the load and
    the whimsey of the scheduler, it could actually sleep longer than
    2 seconds upon occasion.  It now allows sleeps of up to 10 seconds.
Commits on Mar 12, 1990
  1. perl 3.0 patch #14 patch #13, continued

    Larry Wall
    Larry Wall committed Mar 12, 1990
    See patch #13.
  2. perl 3.0 patch #13 (combined patch)

    Larry Wall
    Larry Wall committed Mar 12, 1990
    I added the list slice operator: (LIST)[LIST]
    $hexdigit = (0..9,'a','b','c','d','e','f')[$fourbits]
    There was no way to cut stuff out of the middle of an array
    or to insert stuff without copying the head and tail of the array,
    which is gross.  I added the splice operator to do this:
    @oldelems = splice(@array,$offset,$len,LIST)
    Having -lPW as one of the libraries that Configure looks for
    was causing lots of people grief.  It was only there for
    people using bison who otherwise don't have alloca(), so I
    zapped it.
    Some of the questions that supported the ~name syntax didn't
    say so, and some that should have supported it didn't.  Now they do.
    If you selected the manp directory for your man pages, the manext
    variable was left set to 'n'.
    When Configure sees that the optional libraries have previously
    been determined in, it now believes it rather than using
    the list it generates.
    In the test for byteorder, some compilers get indigestion on the
    constant 0x0807060504030201.  It's now split into two parts.
    Some compilers don't like it if you put CCFLAGS after the .c file
    on the command line.  Some of the Configure tests did this.
    On some systems, the test for vprintf() needs to have stdio.h
    included in order to give valid results.
    Some machines don't support the volatile declaration as applied
    to a pointer.  The Configure test now checks for this.
    Also, cmd.c had some VOLATILE declarations on pointed-to items
    rather than the pointers themselves, causing MIPS heartburn.
    In Makefile.SH, some of the t*.c files needed to have dependencies
    on perly.h.  Additionally, some parallel makes can't handle a
    dependency line with two targets, so the perly.h and perl.c lines
    have been separated.  Also, when perly.h is generated, it will
    now have a declaration added to it for yylval--bison wasn't supplying
    The construct "while (s/x//) {}" was partially fixed in patch 9, but
    there were still some weirdnesses about it.  Hopefully these are
    ironed out now.
    If you did a switch structure based on numeric value, and there
    was some action attached to when the variable is greater than
    the maximum specified value, that action would not happen.  Instead,
    any action for values under the minimum value happened.
    The debugger had some difficulties after patch 9, due to changes
    in the meaning of @array in a scalar context, and because of
    an pointer error in patch 9.
    Because of the fix in patch 9 to let return () work right, the
    construct "return (@array)" did counter-intuitive things.  It
    now returns an array value.  "return @array" and "return (@array)"
    now mean the same thing.
    A pack of ascii strings could call str_ncat() with negative length
    when the length of the string was greater than the length specified
    for the field.
    Patch 9 fixed *name values so that the wouldn't collide with ordinary
    string values, but there were two places I missed, one in perldb,
    and one in the sprintf code.
    Perl looks at commands it is going to execute to see if it can
    bypass /bin/sh and execute them directly.  Ordinarily = is not
    a shell metacharacter, but in a command like "system 'FOO=bar command'"i
    it indicates that /bin/sh should be used, since it's setting an
    environment variable.  It now does that (other than that construct,
    the = character is still not a shell metacharacter).
    If a runtime pattern to split happens to be null, it was being
    interpreted as if it were a space, that is, as the awk-emulating
    split.  It now splits all characters apart, since that's more in
    line with what people expect, and the other behavior wasn't documented.
    Patch 9 added the reserved word "pipe".  The scripts eg/g/gsh and
    /eg/scan/scanner used pipe as filehandle since they were written
    before the recommendation of upper-case filehandles was devised.
    They now use PIPE.
    The undef $/ command was supposed to let you slurp in an entire
    binary file with one <>, but it didn't work as advertised.
    Xenix systems have been having problems with Configure setting
    up ndir right.  Hopefully this will work better now, but it's
    possible the changes will blow someone else up.  Such is life...
    The construct (LIST,) is now legal, so that you can say
    @foo = (
    Various changes were made to the documentation.
    In double quoted strings, you could say \0 to mean the null
    character.  In pattern matches, only \000 was allowed since
    \0 was taken to be a \<digit> backreference.  Since it doesn't
    make sense to refer to the whole matched string before it's done,
    there's no reason \0 can't mean null in a pattern too.  So now
    it does.
    You could modify a numeric variable by using substr as an lvalue,
    and if you then reference the variable numerically, you'd get
    the old number out rather than one derived from the new string.
    Now the old number is invalidated on lvalued substr.
    The test t/op.mkdir should create directories 0777 rather than 0666.
    As Randal requested, the last semicolon of a program is now optional.
    Actually, he just asked for -e 'prog' to have that behaviour, but
    it seemed reasonable to generalize it slightly.  It's been that
    way with eval for some time.
Commits on Feb 28, 1990
  1. perl 3.0 patch #12 patch #9, continued

    Larry Wall
    Larry Wall committed Feb 28, 1990
    See patch #9.
  2. perl 3.0 patch #11 patch #9, continued

    Larry Wall
    Larry Wall committed Feb 28, 1990
    See patch #9.