[12900] in Perl-Users-Digest
Perl-Users Digest, Issue: 310 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 30 09:07:21 1999
Date: Fri, 30 Jul 1999 06:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 30 Jul 1999 Volume: 9 Number: 310
Today's topics:
a regular expression to match both upper and lower case (Keith Salomon)
Re: a regular expression to match both upper and lower (Garth Sainio)
Re: a regular expression to match both upper and lower (Bart Lateur)
ANNOUNCE: 5.005_58 available <tchrist@mox.perl.com>
ANNOUNCE: 5.005_58 perldelta page <tchrist@mox.perl.com>
Re: Comparing Scalars <tchrist@mox.perl.com>
Date incrementing <paulm@dirigo.com>
Re: Directory Listing with Size <Adrian.Duncan@trinite.co.uk>
Re: File upload problem Newbie!! <james.williamson@bbc.co.uk>
Re: form, binary attachments <again> <prinspaul@NOSPAM!hotmail.com>
Re: Getting Height and Width of GIF/JPEG in PERL? <tchrist@mox.perl.com>
Re: help running Perl Scripts in win95 (Anno Siegel)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 30 Jul 1999 14:13:49 GMT
From: salomon@imds.com (Keith Salomon)
Subject: a regular expression to match both upper and lower case
Message-Id: <7ns246$1lii$1@news.gate.net>
I'm trying to use a "regular expression" to match
a string of words in a Mysql database.
$teststring =~ /^computer administration$/;
I know this matches the case-sensitive exact match.
I'd like a "regular expression" that matches either upper or
lower case letter.
I will be using the "regular expression" in a SQL query in the
Mysql database.
Thanks for any help
Keith Salomon
------------------------------
Date: Fri, 30 Jul 1999 07:38:32 -0400
From: modred@shore.net (Garth Sainio)
Subject: Re: a regular expression to match both upper and lower case
Message-Id: <modred-3007990738320001@gniqncy-s02-079.port.shore.net>
In article <7ns246$1lii$1@news.gate.net>, salomon@imds.com wrote:
!! I'm trying to use a "regular expression" to match
!! a string of words in a Mysql database.
!!
!! $teststring =~ /^computer administration$/;
!!
!! I know this matches the case-sensitive exact match.
!!
!! I'd like a "regular expression" that matches either upper or
!! lower case letter.
!!
!! I will be using the "regular expression" in a SQL query in the
!! Mysql database.
!!
!! Thanks for any help
!! Keith Salomon
perldoc perlre
...use the i modifier to make the regular expression case insensitive.
$teststring =~ /^computer administration$/i; will now match any
combination of upper and lower case letters.
Garth
--
Garth Sainio "Finishing second just means you were the
modred@shore.net first to lose" - anonymous
------------------------------
Date: Fri, 30 Jul 1999 11:37:36 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: a regular expression to match both upper and lower case
Message-Id: <37a28dd8.6451106@news.skynet.be>
gKeith Salomon wrote:
>$teststring =~ /^computer administration$/;
>
>I know this matches the case-sensitive exact match.
>
>I'd like a "regular expression" that matches either upper or
>lower case letter.
Simple answer:
$teststring =~ /^computer administration$/i
(note the "i" at the end) but I'm not sure why you want a regex at all.
lc($teststring) eq 'computer administration'
Oh, and this might be up to twice as fast as the case insensitive regex:
lc($teststring) =~ /^computer administration$/
Bart.
------------------------------
Date: 30 Jul 1999 06:46:47 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: ANNOUNCE: 5.005_58 available
Message-Id: <37a19eb7@cs.colorado.edu>
NB: This is actually from gsar, not tchrist!
Date: Tue, 27 Jul 1999 19:56:28 -0700
From: Gurusamy Sarathy <gsar@activestate.com>
Subject:5.005_58 and beyond
To: perl5-porters@perl.org
`Is that The Mountain?' asked Bilbo in a solemn voice, looking at
it with round eyes. He had never seen a thing that looked so big
before.
--A Short Rest, The Hobbit, J R R Tolkien
I'm sure you have noticed that a new release is out, preceded by all
the usual unannounced delays, broken deadlines, interminable ennui,
and sheer source code bloat that you have come to expect out of such a
momentous event.
I summarize here for the casual porter the highlights that have shaped
this release. For details of individual changes, see the changelogs,
or the individual patches available at the usual place. Be sure to read
all the way down. :-)
* internals are thread-safe and multiple interpreters concurrency-safe
when perl is built with -DPERL_IMPLICIT_CONTEXT (auto-enabled with both
MULTIPLICITY and USE_THREADS for this release)
* PERL_OBJECT builds now don't expose C++, eliminating most extension
source compatibility headaches; PERL_OBJECT still only available on
win32, ports to other platforms should be much easier now
* lexical warnings update, all erstwhile mandatory warnings can be
suppressed with no warning; (Paul Marquess)
* defined(@a) and defined(%b) now deprecated (Mark-Jason Dominus)
* support for binary compatibility with 5.005 (Andy Dougherty)
* Devel::DProf now supplied standard (Dean Roehrich and Ilya Zakharevich)
* reworked Pod::Text and pod2text (Russ Allbery)
* three-arg open, along with missing documentation :-) (Ilya Zakharevich)
* calls to win32 system are now globalized, and wide-versions of the
calls are used per the utf8 mode (Doug Lankshear)
* diagnostics on threads other than the main one display thread id (Dan
Sugalski)
* lazyloadlightweight versions of heavily used modules (Ilya Zakharevich)
* beginnings of user-hooks in @INC (Ken Fox)
* small optimization of method name lookups (Chip Salzenberg)
* $foo[10]('foo') allowed (but not foo()('foo')), means $foo[10]->('foo')
(Stephen McCamant)
* pack/unpack support counted strings (Ian Phillipps)
* documentation patches (Chris Nandor, Jeff Okamoto, Abigail, and others)
* implicitly closed handles don't set $? or $! anymore, which means
neglecting to close files explicitly won't affect the status when
program dies
* use caller 'encoding' is supported to inherit the utf8 mode of caller
* expanded locale tests (Jarkko Hietaniemi)
* %{{qw(a b c}} works again
* correct line numbers in (optimized) block scopes that have a single
statement in them (Hugo van der Sanden)
* installation layout improvements (Andy Dougherty and Jarkko Hietaniemi)
* each(%foo) doesn't hold a refcount on last iterated value anymore
* improved sanity check for $foo[1000000000], no longer causes core dumps
(Spider Boardman)
* warning on function calls encountered before prototyped function
declarations/definitions
* various AIX dynamic loading, export list generation updates (Jarkko
Hietaniemi and others)
* more aggressive caching of NV/IV/UV/PV conversions of defined readonly
values (Ilya Zakharevich)
* goto now works when jumping from if block to elsif block
* -foo is properly autoquoted under use integer (-$foo is unchanged)
* pl2bat fixes for win32 (Tye McQueen)
* various extensive Compiler updates (Vishal Bhatia)
* newer B::Deparse (Stephen McCamant)
* ByteLoader enhancements (Tom Hughes)
* Pod::Html enhancements and MakeMaker support for HTML (Jan Dubois)
* fixes for segfaults with $^P (Ilya Zakharevich)
* MakeMaker should now do the right thing when installing manual pages
when using PREFIX
* $foo{$x} and $bar[$i] are allowed in (\$) prototyped slots
* fix for vec() breakage on magic values (Ian Phillipps)
* system() returns -1 and sets $! if exec of child failed (Ilya
Zakharevich)
* reworked find2perl (with documentation!) (Ken Pizzini)
* boolean conversions can now be overloaded (Ilya Zakharevich)
* VMS updates (Charles Bailey & Co.)
* sanity check thread join()ing itself (Dan Sugalski)
* simplified parser by eliminating the CONDOP opclass (Stephen McCamant)
* small memory leak in optimizer fixed (Hugo van der Sanden)
* better diagnostics on read operations from write-only filehandles
* POSIX [[:character class:]] support for standard, locale, and utf8
(Jarkko Hietaniemi)
* 2>&1 in commands is now handled internally (Ilya Zakharevich)
* assignments to lexicals are now optimized to eliminate useless copying
(Ilya Zakharevich)
* fix for $/ = 42 setting paragraph mode (M.J.T. Guy)
* better rationalized RE API (Ilya Zakharevich)
* DB_File 1.67 update (Paul Marquess)
* SOCKS support in Configure (Jarkko Hietaniemi)
* OS2 updates (Ilya Zakharevich)
* cygwin32 update (Eric Fifer and others)
* 64-bit support for AIX (Jarkko Hietaniemi and Martin Rusoff)
* overload, Data::Dumper, and dumpvar understand qr// stringify
overloading
* pp_lc/pp_lcfirst/pp_quotemeta/pp_uc/pp_ucfirst failed to work correctly
with magical values (Jarkko Hietaniemi)
* reworked Class::Struct (Damian Conway)
* update to CGI.pm v2.53 (Lincoln Stein)
* installing to drive root (X:\) should be feasible under Windows
* decimal character in numeric locale is supported (Jarkko Hietaniemi)
* fixed a memory leak in eval 'return sub {...}'
Here is a short list of things still not in there, but are accepted in
theory, and expected to be in there, somewhen before 5.6 de jure:
* overridable opcodes, and its dependent, safe signals
* internal globbing
* ability to fork() interpreters
* missing documentation in various places
Known issues:
* failing test in warning.t#190
* perl -V and Config.pm/ won't work without the patch posted by Ilya
I'll be off to the sunny tropical Indian peninsula for two weeks beginning
2nd August, and expect to put out another quick release before I go,
and another beta-ish one after I return 19th August. Until then, email
messages will be held in a cold, dark area of /var/spool.
Have a productive and prosperous patching season.
Sarathy
gsar@activestate.com
--
X-Windows: Don't get frustrated without it.
--Jamie Zawinski
------------------------------
Date: 30 Jul 1999 06:48:13 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: ANNOUNCE: 5.005_58 perldelta page
Message-Id: <37a19f0d@cs.colorado.edu>
See http://www.perl.com/language/misc/ann58/index.html
NAME
perldelta - what's new for perl v5.6 (as of v5.005_58)
DESCRIPTION
This is an unsupported alpha release, meant for intrepid Perl
developers only. The included sources may not even build
correctly on some platforms. Subscribing to perl5-porters is the
best way to monitor and contribute to the progress of
development releases (see www.perl.org for info).
This document describes differences between the 5.005 release
and this one.
Incompatible Changes
Perl Source Incompatibilities
TODO
C Source Incompatibilities
`PERL_POLLUTE'
Release 5.005 grandfathered old global symbol names by
providing preprocessor macros for extension source
compatibility. As of release 5.6, these preprocessor
definitions are not available by default. You need to
explicitly compile perl with `-DPERL_POLLUTE' to get these
definitions. For extensions still using the old symbols,
this option can be specified via MakeMaker:
perl Makefile.PL POLLUTE=1
`PERL_IMPLICIT_CONTEXT'
This new build option provides a set of macros for all API
functions such that an implicit interpreter/thread context
argument is passed to every API function. As a result of
this, something like `sv_setsv(foo,bar)' amounts to a macro
invocation that actually translates to
`Perl_sv_setsv(my_perl,foo,bar)'. While this is generally
expected to not have any significant source compatibility
issues, the difference between a macro and a real function
call will need to be considered.
Note that the above issue is not relevant to the default
build of Perl, whose interfaces continue to match those of
prior versions (but subject to the other options described
here).
For testing purposes, the 5.005_58 release automatically
enables PERL_IMPLICIT_CONTEXT whenever Perl is built with -
Dusethreads or -Dusemultiplicity.
`PERL_POLLUTE_MALLOC'
Enabling Perl's malloc in release 5.005 and earlier caused
the namespace of system versions of the malloc family of
functions to be usurped by the Perl versions, since by
default they used the same names.
Besides causing problems on platforms that do not allow
these functions to be cleanly replaced, this also meant that
the system versions could not be called in programs that
used Perl's malloc. Previous versions of Perl have allowed
this behaviour to be suppressed with the HIDEMYMALLOC and
EMBEDMYMALLOC preprocessor definitions.
As of release 5.6, Perl's malloc family of functions have
default names distinct from the system versions. You need to
explicitly compile perl with `-DPERL_POLLUTE_MALLOC' to get
the older behaviour. HIDEMYMALLOC and EMBEDMYMALLOC have no
effect, since the behaviour they enabled is now the default.
Note that these functions do not constitute Perl's memory
allocation API. See the section on "Memory Allocation" in
the perlguts manpage for further information about that.
`PL_na' and `dTHR' Issues
The `PL_na' global is now thread local, so a `dTHR'
declaration is needed in the scope in which the global
appears. XSUBs should handle this automatically, but if you
have used `PL_na' in support functions, you either need to
change the `PL_na' to a local variable (which is
recommended), or put in a `dTHR'.
Compatible C Source API Changes
`PATCHLEVEL' is now `PERL_VERSION'
The cpp macros `PERL_REVISION', `PERL_VERSION', and
`PERL_SUBVERSION' are now available by default from perl.h,
and reflect the base revision, patchlevel, and subversion
respectively. `PERL_REVISION' had no prior equivalent, while
`PERL_VERSION' and `PERL_SUBVERSION' were previously
available as `PATCHLEVEL' and `SUBVERSION'.
The new names cause less pollution of the cpp namespace and
reflect what the numbers have come to stand for in common
practice. For compatibility, the old names are still
supported when patchlevel.h is explicitly included (as
required before), so there is no source incompatibility from
the change.
Binary Incompatibilities
The default build of this release can be made binary compatible
with the 5.005 release or its maintenance versions. Add -
DPERL_BINCOMPAT_5005 to ccflags in config.sh to achieve this.
See INSTALL for further information about adding build flags to
config.sh.
The usethreads or usemultiplicity builds are not binary
compatible with the corresponding builds in 5.005.
Core Changes
Unicode and UTF-8 support
Perl can optionally use UTF-8 as its internal representation for
character strings. The `use utf8' pragma enables this support in
the current lexical scope. See the utf8 manpage for more
information.
Lexically scoped warning categories
You can now control the granularity of warnings emitted by perl
at a finer level using the `use warning' pragma. See the warning
manpage and the perllexwarn manpage for details.
Binary numbers supported
Binary numbers are now supported as literals, in s?printf
formats, and `oct()':
$answer = 0b101010;
printf "The answer is: %b\n", oct("0b101010");
syswrite() ease-of-use
The length argument of `syswrite()' is now optional.
64-bit support
Better 64-bit support -- but full support still a distant goal.
One must Configure with -Duse64bits to get Configure to probe
for the extent of 64-bit support. Depending on the platform
(hints file) more or less 64-awareness becomes available. As of
5.005_54 at least somewhat 64-bit aware platforms are HP-UX 11
or better, Solaris 2.6 or better, IRIX 6.2 or better. Naturally
64-bit platforms like Digital Unix and UNICOS also have 64-bit
support.
Better syntax checks on parenthesized unary operators
Expressions such as:
print defined(&foo,&bar,&baz);
print uc("foo","bar","baz");
undef($foo,&bar);
used to be accidentally allowed in earlier versions, and
produced unpredictable behaviour. Some produced ancillary
warnings when used in this way; others silently did the wrong
thing.
The parenthesized forms of most unary operators that expect a
single argument now ensure that they are not called with more
than one argument, making the cases shown above syntax errors.
The usual behaviour of:
print defined &foo, &bar, &baz;
print uc "foo", "bar", "baz";
undef $foo, &bar;
remains unchanged. See the perlop manpage.
POSIX character class syntax [: :] supported
For example to match alphabetic characters use /[[:alpha:]]/.
See the perlre manpage for details.
Improved `qw//' operator
The `qw//' operator is now evaluated at compile time into a true
list instead of being replaced with a run time call to
`split()'. This removes the confusing misbehaviour of `qw//' in
scalar context, which had inherited that behaviour from split().
Thus:
$foo = ($bar) = qw(a b c); print "$foo|$bar\n";
now correctly prints "3|a", instead of "2|a".
pack() format 'Z' supported
The new format type 'Z' is useful for packing and unpacking
null-terminated strings. See the section on "pack" in the
perlfunc manpage.
pack() format modifier '!' supported
The new format type modifier '!' is useful for packing and
unpacking native shorts, ints, and longs. See the section on
"pack" in the perlfunc manpage.
pack() and unpack() support counted strings
The template character '#' can be used to specify a counted
string type to be packed or unpacked. See the section on "pack"
in the perlfunc manpage.
$^X variables may now have names longer than one character
Formerly, $^X was synonymous with ${"\cX"}, but $^XY was a
syntax error. Now variable names that begin with a control
character may be arbitrarily long. However, for compatibility
reasons, these variables *must* be written with explicit braces,
as `${^XY}' for example. `${^XYZ}' is synonymous with
${"\cXYZ"}. Variable names with more than one control character,
such as `${^XY^Z}', are illegal.
The old syntax has not changed. As before, `^X' may be either a
literal control-X character or the two-character sequence
`caret' plus `X'. When braces are omitted, the variable name
stops after the control character. Thus `"$^XYZ"' continues to
be synonymous with `$^X . "YZ"' as before.
As before, lexical variables may not have names beginning with
control characters. As before, variables whose names begin with
a control character are always forced to be in package `main'.
All such variables are reserved for future extensions, except
those that begin with `^_', which may be used by user programs
and is guaranteed not to acquire special meaning in any future
version of Perl.
Significant bug fixes
<HANDLE> on empty files
With `$/' set to `undef', slurping an empty file returns a
string of zero length (instead of `undef', as it used to) the
first time the HANDLE is read. Further reads yield `undef'.
This means that the following will append "foo" to an empty file
(it used to do nothing):
perl -0777 -pi -e 's/^/foo/' empty_file
The behaviour of:
perl -pi -e 's/^/foo/' empty_file
is unchanged (it continues to leave the file empty).
`eval '...'' improvements
Line numbers (as reflected by caller() and most diagnostics)
within `eval '...'' were often incorrect when here documents
were involved. This has been corrected.
Lexical lookups for variables appearing in `eval '...'' within
functions that were themselves called within an `eval '...''
were searching the wrong place for lexicals. The lexical search
now correctly ends at the subroutine's block boundary.
Parsing of here documents used to be flawed when they appeared
as the replacement expression in `eval 's/.../.../e''. This has
been fixed.
Automatic flushing of output buffers
fork(), exec(), system(), qx//, and pipe open()s now flush
buffers of all files opened for output when the operation was
attempted. This mostly eliminates confusing buffering mishaps
suffered by users unaware of how Perl internally handles I/O.
Better diagnostics on meaningless filehandle operations
Constructs such as `open(<FH>)' and `close(<FH>)' are compile
time errors. Attempting to read from filehandles that were
opened only for writing will now produce warnings (just as
writing to read-only filehandles does).
Supported Platforms
* VM/ESA is now supported.
* Siemens BS2000 is now supported under the POSIX Shell.
* The Mach CThreads (NEXTSTEP, OPENSTEP) are now supported by the
Thread extension.
* GNU/Hurd is now supported.
* Rhapsody is now supported.
* EPOC is is now supported (on Psion 5).
New tests
op/io_const
IO constants (SEEK_*, _IO*).
op/io_dir
Directory-related IO methods (new, read, close, rewind, tied
delete).
op/io_multihomed
INET sockets with multi-homed hosts.
op/io_poll
IO poll().
op/io_unix
UNIX sockets.
op/filetest
File test operators.
op/lex_assign
Verify operations that access pad objects (lexicals and
temporaries).
Modules and Pragmata
Modules
ByteLoader
The ByteLoader is a dedication extension to generate and run
Perl bytecode. See the ByteLoader manpage.
B The Perl Compiler suite has been extensively reworked for this
release.
Devel::DProf
Devel::DProf, a Perl source code profiler has been added.
Dumpvalue
Added Dumpvalue module provides screen dumps of Perl data.
Benchmark
You can now run tests for *n* seconds instead of guessing
the right number of tests to run: e.g. timethese(-5, ...)
will run each code for at least 5 CPU seconds. Zero as the
"number of repetitions" means "for at least 3 CPU seconds".
The output format has also changed. For example:
use Benchmark;$x=3;timethese(-
5,{a=>sub{$x*$x},b=>sub{$x**2}})
will now output something like this:
Benchmark: running a, b, each for at least 5 CPU seconds...
a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @
200551.91/s (n=1156516) b: 4 wallclock secs ( 5.00 usr +
0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686)
New features: "each for at least N CPU seconds...",
"wallclock secs", and the "@ operations/CPU second
(n=operations)".
Devel::Peek
The Devel::Peek module provides access to the internal
representation of Perl variables and data. It is a data
debugging tool for the XS programmer.
Fcntl
More Fcntl constants added: F_SETLK64, F_SETLKW64,
O_LARGEFILE for large (more than 4G) file access (64-bit
support is not yet working, though, so no need to get overly
excited), Free/Net/OpenBSD locking behaviour flags F_FLOCK,
F_POSIX, Linux F_SHLCK, and O_ACCMODE: the mask of O_RDONLY,
O_WRONLY, and O_RDWR.
File::Spec
New methods have been added to the File::Spec module:
devnull() returns the name of the null device (/dev/null on
Unix) and tmpdir() the name of the temp directory (normally
/tmp on Unix). There are now also methods to convert between
absolute and relative filenames: abs2rel() and rel2abs().
For compatibility with operating systems that specify volume
names in file paths, the splitpath(), splitdir(), and
catdir() methods have been added.
File::Spec::Functions
The new File::Spec::Functions modules provides a function
interface to the File::Spec module. Allows shorthand
$fullname = catfile($dir1, $dir2, $file);
instead of
$fullname = File::Spec->catfile($dir1, $dir2, $file);
Math::BigInt
The logical operations `<<', `>>', `&', `|', and `~' are now
supported on bigints.
Math::Complex
The accessor methods Re, Im, arg, abs, rho, and theta can
now also act as mutators (accessor $z->Re(), mutator $z-
>Re(3)).
Math::Trig
A little bit of radial trigonometry (cylindrical and
spherical), radial coordinate conversions, and the great
circle distance were added.
SDBM_File
An EXISTS method has been added to this module (and
sdbm_exists() has been added to the underlying sdbm
library), so one can now call exists on an SDBM_File tied
hash and get the correct result, rather than a runtime
error.
Time::Local
The timelocal() and timegm() functions used to silently
return bogus results when the date exceeded the machine's
integer range. They now consistently croak() if the date
falls in an unsupported range.
Win32
The error return value in list context has been changed for
all functions that return a list of values. Previously these
functions returned a list with a single element `undef' if
an error occurred. Now these functions return the empty list
in these situations. This applies to the following
functions:
Win32::FsType
Win32::GetOSVersion
The remaining functions are unchanged and continue to return
`undef' on error even in list context.
The Win32::SetLastError(ERROR) function has been added as a
complement to the Win32::GetLastError() function.
The new Win32::GetFullPathName(FILENAME) returns the full
absolute pathname for FILENAME in scalar context. In list
context it returns a two-element list containing the fully
qualified directory name and the filename.
DBM Filters
A new feature called "DBM Filters" has been added to all the
DBM modules--DB_File, GDBM_File, NDBM_File, ODBM_File, and
SDBM_File. DBM Filters add four new methods to each DBM
module:
filter_store_key
filter_store_value
filter_fetch_key
filter_fetch_value
These can be used to filter key-value pairs before the pairs
are written to the database or just after they are read from
the database. See the perldbmfilter manpage for further
information.
Pragmata
`use utf8' to enable UTF-8 and Unicode support.
`use caller 'encoding'' allows modules to inherit pragmatic
attributes from the caller's context. `encoding' is currently
the only supported attribute.
Lexical warnings pragma, `use warning;', to control optional
warnings.
`use filetest' to control the behaviour of filetests (`-r' `-w'
...). Currently only one subpragma implemented, "use filetest
'access';", that enables the use of access(2) or equivalent to
check permissions instead of using stat(2) as usual. This
matters in filesystems where there are ACLs (access control
lists): the stat(2) might lie, but access(2) knows better.
Utility Changes
Todo.
Documentation Changes
perlopentut.pod
A tutorial on using open() effectively.
perlreftut.pod
A tutorial that introduces the essentials of references.
perltootc.pod
A tutorial on managing class data for object modules.
New Diagnostics
/%s/: Unrecognized escape \\%c passed through
(W) You used a backslash-character combination which is not
recognized by Perl. This combination appears in an interpolated
variable or a `''-delimited regular expression.
Filehandle %s opened only for output
(W) You tried to read from a filehandle opened only for writing.
If you intended it to be a read-write filehandle, you needed to
open it with "+<" or "+>" or "+>>" instead of with "<" or
nothing. If you intended only to read from the file, use "<".
See the "open" entry in the perlfunc manpage.
Missing command in piped open
(W) You used the `open(FH, "| command")' or `open(FH, "command
|")' construction, but the command was missing or blank.
Unrecognized escape \\%c passed through
(W) You used a backslash-character combination which is not
recognized by Perl.
defined(@array) is deprecated
(D) defined() is not usually useful on arrays because it checks
for an undefined *scalar* value. If you want to see if the array
is empty, just use `if (@array) { # not empty }' for example.
defined(%hash) is deprecated
(D) defined() is not usually useful on hashes because it checks
for an undefined *scalar* value. If you want to see if the hash
is empty, just use `if (%hash) { # not empty }' for example.
Obsolete Diagnostics
Todo.
Configuration Changes
installusrbinperl
You can use "Configure -Uinstallusrbinperl" which causes
installperl to skip installing perl also as /usr/bin/perl. This
is useful if you prefer not to modify /usr/bin for some reason
or another but harmful because many scripts assume to find Perl
in /usr/bin/perl.
SOCKS support
You can use "Configure -Dusesocks" which causes Perl to probe
for the SOCKS proxy protocol library, http://www.socks.nec.com/
BUGS
If you find what you think is a bug, you might check the headers
of articles recently posted to the comp.lang.perl.misc
newsgroup. There may also be information at
http://www.perl.com/perl/, the Perl Home Page.
If you believe you have an unreported bug, please run the
perlbug program included with your release. Make sure to trim
your bug down to a tiny but sufficient test case. Your bug
report, along with the output of `perl -V', will be sent off to
perlbug@perl.com to be analysed by the Perl porting team.
SEE ALSO
The Changes file for exhaustive details on what changed.
The INSTALL file for how to build Perl.
The README file for general stuff.
The Artistic and Copying files for copyright information.
HISTORY
Written by Gurusamy Sarathy <gsar@umich.edu>, with many
contributions from The Perl Porters.
Send omissions or corrections to <perlbug@perl.com>.
--
echo "Congratulations. You aren't running Eunice."
--Larry Wall in Configure from the perl distribution
------------------------------
Date: 30 Jul 1999 05:35:57 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Comparing Scalars
Message-Id: <37a18e1d@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
abigail@delanet.com writes:
:All these variations, but you left out the less magical:
:
: if (!grep {$_ != 37} @array) {
: # do case when all members of the array are 37.
: # (or when none of the members isn't 37.)
: } else {
: # do case when at least one isn't 37.
: }
I try very hard not to say "if not". And seeing both the !'s just makes
my head hurt sometimes. And it's not just code. "none of the members
isn't" still makes me scratch my head for a second. But perhaps this
is just the effect of reading code before coffee or tea in the morning.
--tom
--
Nuclear war doesn't prove who's Right, just who's Left (ABC news 10/13/87)
------------------------------
Date: Fri, 30 Jul 1999 12:44:08 GMT
From: Stone Cold <paulm@dirigo.com>
Subject: Date incrementing
Message-Id: <7ns6mm$bgi$1@nnrp1.deja.com>
Does anyone know how to easily increment a date?
I'm working with CGI scripting via web interface. The user enters a
beginning date via a form and that begin date is displayed on the
output page. What I need to do is setup a way so that the date that
was entered is incremented by 1 month for 5 months.
For example, if the user enters in "may-99" in the user form, the
output would show like follows:
May-99 Jun-99 Jul-99 Aug-99 Sep-99 Oct-99
So basically, I need to increment the date entered by 1 month, for 5
months beyond the date entered. I'm pretty close now by incrementing
variables, but sort of lost.
Thanks in advance.
--
Paul R. Mesker
System Engineer
Dirigo Inc.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 30 Jul 1999 13:02:06 +0100
From: Adrian Duncan <Adrian.Duncan@trinite.co.uk>
Subject: Re: Directory Listing with Size
Message-Id: <37A1943D.955BE4E0@trinite.co.uk>
This works a treat. Thanks very much.
AJ
tjfreedog@my-deja.com wrote:
> This is not really a perl solution although it could easilly be
> included into one. There is an NT resource kit utility called
> DIRUSE.EXE that appears to do exactly what you want. You give it the
> root path name and it will give you file statistic totals such as
> number of files and sizes broken down by directory and/or sub-
> directory. I use it to figure out which directory (and thereby which
> user) is using up the most drive space.
>
> Here is the usage info you get by calling DIRUSE /?
> =====================
> DIRUSE displays a list of disk usage for a directory tree(s). Version
> 1.20
>
> DIRUSE [/S | /V] [/M | /K | /B] [/C] [/,] [/Q:# [/L] [/A] [/D] [/O]]
> [/*] DIRS
>
> /S Specifies whether subdirectories are included in the output.
> /V Output progress reports while scanning subdirectories. Ignored
> if /S is specified.
> /M Displays disk usage in megabytes.
> /K Displays disk usage in kilobytes.
> /B Displays disk usage in bytes (default).
> /C Use Compressed size instead of apparent size.
> /, Use thousand separator when displaying sizes.
> /Q:# Mark directories that exceed the specified size (#) with a "!".
> (If /M or /K is not specified, then bytes is assumed.)
> /L Output overflows to logfile .\DIRUSE.LOG.
> /A Specifies that an alert is generated if specified sizes are
> exceeded. (The Alerter service must be running.)
> /D Displays only directories that exceed specified sizes.
> /O Specifies that subdirectories are not checked for specified size
> overflow.
> /* Uses the top-level directories residing in the specified DIRS
> DIRS Specifies a list of the paths to check.
>
> Note: Parameters can be typed in any order. And the '-' symbol can be
> used in place of the '/' symbol.
>
> Also, if /Q is specified, then return code is ONE if any
> directories are found that exceed the specified sizes.
> Otherwise the return code is ZERO.
>
> Example: diruse /s /m /q:1.5 /l /* c:\users
> =====================
>
> Hope this helps
>
> In article <379F2274.F239A71@trinite.co.uk>,
> Adrian Duncan <Adrian.Duncan@trinite.co.uk> wrote:
> > Jason,
> > cheers for the reply.
> >
> > I had thought of using dir /s, but this is quite slow.
> > I would have to parse each line looking for a line
> > that says Total Files and then take the size from the
> > next line.
> >
> > Do you know of a more expedient method?
> > Full specs below
> > Cheers
> > Adrian.
> >
> > Full Spec:
> > I have 3 or more web servers.
> > Each has a directory called webpages.
> > I need to get a list of each directory under
> > this directory and how much space it takes up,
> > including any sub directories. We need to do this
> > to bill people for the amount of space that their
> > web domain takes up.
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: Fri, 30 Jul 1999 12:45:46 +0100
From: "James Williamson" <james.williamson@bbc.co.uk>
Subject: Re: File upload problem Newbie!!
Message-Id: <7ns3bs$hsu$1@nntp0.reith.bbc.co.uk>
Paul Foran wrote in message <37A15C68.35B0A14D@analog.com>...
>Abigail wrote:
>
>> Paul Foran (Paul.Foran@analog.com) wrote on MMCLVIII September MCMXCIII
>> in <URL:news:37A05998.2C01C06D@analog.com>:
>> == Hi all,
>> == Can somebody get me started on this one as I am new to Perl. I need
to
>>
>> Here are the first two lines:
>>
>> #!/opt/perl/bin/perl -w
>> use strict;
>>
>> == be able to upload a Data file to a server via a HTML form. The
datafile
>> == is delimited table from MS Access. I need towrite to srcipts that will
>> == accept the file being uploaded and to also get MSQL to read this table
>> == into an exsisting table within MSQL.
>> ==
>> == Any solutions , thanks alot
>>
>> You mean, completely written programs, based on the 0 characters you
>> contributed? Sure, but are you going to pay the rates?
>>
>> Here's a suggestion: learn Perl. Study the specifics of your problem.
>> Write code. Fail. Learn from your failures. Meditate over the FAQ.
>> Hug a tree. Write more code. Don't crosspost to comp.lang.perl.modules.
>>
>> Then, if you get stuck with a specific Perl problem, that's not a FAQ,
>> or explained in the manual, you post your question here.
>>
>> Abigail
>> --
>> sub
_'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
>> "$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub
_{print+/.*::(.*)/s}
>> *_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
>>
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J()))))))))))))))))))))
)))
>>
>> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
==----------
>> http://www.newsfeeds.com The Largest Usenet Servers in the
World!
>> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers
==-----
>
>ABIGAIL,
>HEY I did not say the COMPLETE PROGRAM. READ THE CONTENT OF THE MY POST.
>"SOMETHING TO GET ME STARTED" to point me int the right direction. This is
a
>newgroup right??
>
Normally Abigail is pretty rude, but she's got a point, why don't I subscrib
e to comp.housebuilders.misc and post
"I'm new to this home building stuff, I've bought a bag of cement, any
suggestions, any solutions; can anyone help me out?"
You wouldn't expect them to do anything for you so why is this newsgroup any
different, apart from Perl hackers problem earn loads more than your average
builder?
James
------------------------------
Date: Fri, 30 Jul 1999 13:12:44 +0200
From: "Paolo" <prinspaul@NOSPAM!hotmail.com>
Subject: Re: form, binary attachments <again>
Message-Id: <7ns10e$ijl2$1@reader3.wxs.nl>
>>>Translation: Solve my problem but don't bother me with pesky
>>>details.
>>
>> Well you could put it that way.
>> But it's NOT what I wrote, it's what you make of it.
>> Why should I invent this wheel again ?
>>
>>>Go away.
>>
>> Since no one here is going to help me by giving me some code
>> I guess I have to figure out Perl after all %#%@ !
>> So sorry Anno I'm here to stay
>>
>
>Oh thats a shame for you because I figure that you've now totally blown
>any chances you had of getting help here ...
>
>*plonk*
Yes, I saw that one coming
...but we'll see about that
but I know I didn't make a helluva start
------------------------------
Date: 30 Jul 1999 06:05:55 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <37a19523@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
abigail@delanet.com writes:
:For years, one of the items in one of the drop down menus of my copy of
:Netscape had the label "The Evil Empire". It was the link to Netscape's
:web site.
I wonder whether people remember this whole Evil Empire thing. It was
because the AT&T logo resembled the Death Star, and they were battling
BSD on idiotic copyright crap.
If you have ever seen the grim word "login:" on a screen, your mind
is now a wholly-owned subsidiary of The Death Star.
John Woods in <14105@ksr.com> of comp.unix.bsd
It made a lot of sense to apply the Evil Empire epithet to something
that actually resembles the Death Star symbol. Since then, use of the
moniker has obviously broadened. For example, now "Evil Empire" means
Microsoft, but they have no Death Star.
BTW, have you ever noticed that some people call it "pop-up menu" (X11
folk) and others (Macinfolk?) call the same thing a "drop-down menu"?
I wonder whether anyone calls it a "soda-round menu"? :-)
--tom
--
Liberty is not the freedom to do whatever we want, it is the freedom to do
whatever we are able.
------------------------------
Date: 30 Jul 1999 12:58:38 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: help running Perl Scripts in win95
Message-Id: <7ns7hu$366$1@lublin.zrz.tu-berlin.de>
llornkcor@earthlink.net <llornkcor@earthlink.net> wrote in comp.lang.perl.misc:
>hehehe- funny answer... God module, I like that.... :o)
Your appreciation would be more gladly received if you had put it
after the appropriately trimmed text you are replying to, WHERE
IT BELONGS GODDAMMIT.
>to the original poster-you also might see if Front Page extensions are
>installed on your server, if thats what the sfript is using.
>
>"Lauren Smith" <laurens@bsquare.com> writes:
[etc]
Anno
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 310
*************************************