summaryrefslogtreecommitdiff
path: root/x2p
Commit message (Collapse)AuthorAgeFilesLines
* perl 3.0: (no announcement message available)perl-3.000Larry Wall1989-10-1817-436/+1577
| | | | | | | | | | | | | | A few of the new features: (18 Oct) * Perl can now handle binary data correctly and has functions to pack and unpack binary structures into arrays or lists. You can now do arbitrary ioctl functions. * You can now pass things to subroutines by reference. * Debugger enhancements. * An array or associative array may now appear in a local() list. * Array values may now be interpolated into strings. * Subroutine names are now distinguished by prefixing with &. You can call subroutines without using do, and without passing any argument list at all. * You can use the new -u switch to cause perl to dump core so that you can run undump and produce a binary executable image. Alternately you can use the "dump" operator after initializing any variables and such. * You can now chop lists. * Perl now uses /bin/csh to do filename globbing, if available. This means that filenames with spaces or other strangenesses work right. * New functions: mkdir and rmdir, getppid, getpgrp and setpgrp, getpriority and setpriority, chroot, ioctl and fcntl, flock, readlink, lstat, rindex, pack and unpack, read, warn, dbmopen and dbmclose, dump, reverse, defined, undef.
* perl 2.0 (no announcement message available)perl-2.0Larry Wall1988-06-0517-180/+256
| | | | | | | | | | | | | | | | | | | | | | | | Some of the enhancements from Perl1 included: * New regexp routines derived from Henry Spencer's. o Support for /(foo|bar)/. o Support for /(foo)*/ and /(foo)+/. o \s for whitespace, \S for non-, \d for digit, \D nondigit * Local variables in blocks, subroutines and evals. * Recursive subroutine calls are now supported. * Array values may now be interpolated into lists: unlink 'foo', 'bar', @trashcan, 'tmp'; * File globbing. * Use of <> in array contexts returns the whole file or glob list. * New iterator for normal arrays, foreach, that allows both read and write. * Ability to open pipe to a forked off script for secure pipes in setuid scripts. * File inclusion via do 'foo.pl'; * More file tests, including -t to see if, for instance, stdin is a terminal. File tests now behave in a more correct manner. You can do file tests on filehandles as well as filenames. The special filetests -T and -B test a file to see if it's text or binary. * An eof can now be used on each file of the <> input for such purposes as resetting the line numbers or appending to each file of an inplace edit. * Assignments can now function as lvalues, so you can say things like ($HOST = $host) =~ tr/a-z/A-Z/; ($obj = $src) =~ s/\.c$/.o/; * You can now do certain file operations with a variable which holds the name of a filehandle, e.g. open(++$incl,$includefilename); $foo = <$incl>; * Warnings are now available (with -w) on use of uninitialized variables and on identifiers that are mentioned only once, and on reference to various undefined things. * There is now a wait operator. * There is now a sort operator. * The manual is now not lying when it says that perl is generally faster than sed. I hope.
* perl 1.0 patch 14: a2p incorrectly translates 'for (a in b)' construct.Jeff Siegal1988-02-011-3/+6
| | | | | The code a2p creates for the 'for (a in b)' construct ends up assigning the wrong value to the key variable.
* perl 1.0 patch 12: scripts made by a2p doen't handle leading white space ↵Kriton Kyrimis1988-02-012-8/+12
| | | | | | | | | | | | | | right on input Awk ignores leading whitespace on split. Perl by default does not. The a2p translator couldn't handle this. The fix is partly to a2p and partly to perl. Perl now has a way to specify to split to ignore leading white space as awk does. A2p now takes advantage of that. I also threw in an optimization that let's runtime patterns compile just once if they are known to be constant, so that split(' ') doesn't compile the pattern every time.
* perl 1.0 patch 8: perl needed an eval operator and a symbolic debuggerLarry Wall1988-01-272-5/+15
| | | | | | | | | | | I didn't add an eval operator to the original perl because I hadn't thought of any good uses for it. Recently I thought of some. Along with creating the eval operator, this patch introduces a symbolic debugger for perl scripts, which makes use of eval to interpret some debugging commands. Having eval also lets me emulate awk's FOO=bar command line behavior with a line such as the one a2p now inserts at the beginning of translated scripts.
* perl 1.0 patch 7: use of included malloc.c should be optionalArnold D. Robbins1988-01-261-3/+12
| | | | | | | The version of malloc.c that comes with perl was not really intended to be used everywhere--it was included mostly for debugging purposes. It's a nice little package, however, so I'm making it optional (via Configure) as to whether you want it or not.
* perl 1.0 patch 5: a2p didn't make use of the config.h generated by ConfigureArnold D. Robbins1988-01-251-1/+12
| | | | | | The a2p program used index() and bcopy(), both of do not exist everywhere. Since Configure was already figuring out about those functions, it is fairly trivial to get a2p to make use of the info.
* a "replacement" for awk and sedperl-1.0Larry Wall1987-12-1817-0/+5025
[ Perl is kind of designed to make awk and sed semi-obsolete. This posting will include the first 10 patches after the main source. The following description is lifted from Larry's manpage. --r$ ] Perl is a interpreted language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). It combines (in the author's opinion, anyway) some of the best features of C, sed, awk, and sh, so people familiar with those languages should have little difficulty with it. (Language historians will also note some vestiges of csh, Pascal, and even BASIC-PLUS.) Expression syntax corresponds quite closely to C expression syntax. If you have a problem that would ordinarily use sed or awk or sh, but it exceeds their capabilities or must run a little faster, and you don't want to write the silly thing in C, then perl may be for you. There are also translators to turn your sed and awk scripts into perl scripts.