[comp.sources.d] beta 2 available for perl 2.0

lwall@devvax.JPL.NASA.GOV (Larry Wall) (05/07/88)

The second beta distribution of perl 2.0 is available via anonymous ftp
from jpl-devvax.jpl.nasa.gov (128.149.8.43 or 128.149.13.43).  Look in
pub/perl.2.0.beta2/kits.  If you had trouble getting through before, our
link to the outside world is improved now, so you may do better.

Please feel free to try it out if you have any kind of exotic machine.
Or even if you don't.

Larry Wall
lwall@jpl-devvax.jpl.nasa.gov

P.S. For those of you who are not immune to hype, here are the differences
between 1.0 (patchlevel 29) and 2.0:

New regexp routines derived from Henry Spencer's.
	Support for /(foo|bar)/.
	Support for /(foo)*/ and /(foo)+/.
	\s for whitespace, \S nonwhitespace
	\d for digit, \D nondigit

Local variables in blocks, subroutines and evals.

Recursive subroutine calls are now supported.  (Does this make it a real
language now?)

Array values may now be interpolated into lists:
	unlink 'foo', 'bar', @trashcan, 'tmp';

File globbing via <*.foo>.

Use of <> in array contexts returns the whole file or glob list:
	unlink <*.foo>;

New iterator for normal arrays, foreach, that allows both read and write:
	foreach $elem ($array) {
		$elem =~ s/foo/bar/;
	}

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.

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/;
	($foo = 'aaa')++;	# ends up 'aab'

You can now do certain file operations with a variable which holds the name
of a filehandle, e.g. open(++$incl,$includefilename); $foo = <$incl>;

You can now a subroutine indirectly through a scalar variable:
	$which = 'xyz';
	do $which('foo');	# calls xyz

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.

The -S switch causes perl to search the PATH for the script so that you can say
	eval "exec /usr/bin/perl -S $0 $*"
		if $running_under_some_shell;

Reset now resets arrays and associative arrays as well as string variables.

Assigning off the end of an array now nulls out any intervening values.

$#foo is now an lvalue.  You can preallocate or truncate arrays, or recover
values lost to prior truncation.

$#foo is now indexed to $[ properly.

s/foo/bar/i optimization bug fixed.

The $x = "...$x..."; bug is fixed.

The @ary = (1); bug is now fixed.  You can even say @ary = 1;

$= now returns the correct value.

Several of the larger files are now split into smaller pieces for easier
compilation.