SPUG: Doc. bug on glob() in 3rd ed. Camel

Tim Maher tim at consultix-inc.com
Tue Jan 18 18:55:35 PST 2005

On Tue, Jan 18, 2005 at 05:14:39PM -0800, Tim Maher wrote:
> The 3rd ed. Camel, p. 727 on "glob" says [^abc] complements the
> list (as in C-shell), but it is really ! that does that, as in
> Bourne/Korn/Bash shells. And this documentation bug is not listed at
> O'Reilly's errata page for this book.

While I'm doing last-minute research for /my/ book, I've got to learn
to stop believing what I'm reading in /other/ books! 

As a case in point, my 3rd edition Camel (7/00) was probably
describing the behavior of Perl v5.6.0, and accurately representing
the behavior of glob() at that time.

However, it seems that File::Glob (which glob() calls) started
using bsd_glob() instead of the old Csh-based code some time
after the Camel's publication, which accounts for the mismatch
between the Camel's pronouncements and the reality of the current
state of Perl.

So I retract my complaint about the Camel, and re-allocate it to
the on-line docs for the Perl versions I tested (5.8.0,
5.8.5). In each, "perldoc -f glob" says csh-style behavior is
what glob gives you, which is incorrect at least in regard
to the "!" vs "^" character-class complementing character
(Perl uses the non-C-sh ! now, rather than the Csh's ^).

We can't blame a book for getting out of date, but we can
certainly hope that the on-line documentation shipped with Perl
itself will be in sync with the software.

I'll file a bug report.

| Tim Maher, PhD     (206) 781-UNIX      (866) DOC-PERL     (866) DOC-UNIX |
| tim(AT)Consultix-Inc.Com  http://TeachMePerl.Com  http://TeachMeUnix.Com |
|      Watch for my upcoming book: "Minimal Perl for UNIX/Linux People"    |
| Classes:  2/14: Minimal Perl  2/15: Hashes & Arrays  2/16-18: Int. Perl  |

More information about the spug-list mailing list