[6663] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 288 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 12 13:07:12 1997

Date: Sat, 12 Apr 97 10:00:25 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 12 Apr 1997     Volume: 8 Number: 288

Today's topics:
     Re: A bug in stat() ? (M.J.T. Guy)
     ANNOUNCE: libHTML 1.00 (beta 1) (Joe Casadonte)
     Re: Crypt function doesn't appear to work (David Alan Black)
     Re: Crypt function doesn't appear to work (David Alan Black)
     Gloph: A Fulltext Indexer (Andru Luvisi)
     help with Perl boundaries <dperdue@vec.net>
     Re: help with Perl boundaries (M.J.T. Guy)
     Re: HELP: Recursive directory mapping (Andrew M. Langmead)
     Re: IIS: Perl CGI's execing command line progs, can't r (Duncan Harris)
     Re: Kudos to Tom Christiansen and problems with OO (I R A Aggie)
     Re: Negative lookahead and nested stars BUG? (M.J.T. Guy)
     Re: Ousterhout and Tcl lost the plot with latest paper <trimble@walrus.com>
     Re: Ousterhout and Tcl lost the plot with latest paper <oakley@healthcare.com>
     Re: Perl-Books. <jeffo@execpc.com>
     PLEASE HELP <santiago@gambito.com>
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Cyber Surfer)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Cyber Surfer)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and <amullhau@ix.netcom.com>
     Re: Running Perl script w/i Unix Shell Script <critter@quack.kfu.com>
     Re: Split a line on "^M" (Rahul Dhesi)
     Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
     Re: unable to execute ? <critter@quack.kfu.com>
     Re: Unique Filename <jbecker@erols.com>
     Re: Unix and ease of use  (WAS: Who makes more ...) <dean@cyberzone-inc.com>
     Re: Unix and ease of use  (WAS: Who makes more ...) <tim@a-sis.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 12 Apr 1997 14:21:07 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: A bug in stat() ?
Message-Id: <5io5oj$h40@lyra.csx.cam.ac.uk>


Chris Manning  <chrism@spuddy.mew.co.uk> wrote:
>The blue camel book says
>
>   If stat is passed the special file handle consisting of an underline, no
>   actual stat(2) is done, but the current contents of the stat structure
>   from the last stat or stat-based file test (the -x operators) are
>   returned.
>
>Every other piece of documentation that I can find says something similar,
>but while this
    [snip]
>works as I'd expect, this
    [snip]
>doesn't.  It seems that the second stat() has returned an empty array.  If
>stat() is broken it's been so for a long time, as I've tried it on versions
>of perl from 3.0.1.9 to 5.003, with consistent results.

This bug is mended in Perl 5.004beta.


Mike Guy


------------------------------

Date: 12 Apr 1997 14:34:59 GMT
From: joc@netaxs.com (Joe Casadonte)
Subject: ANNOUNCE: libHTML 1.00 (beta 1)
Message-Id: <5io6ij$fhk$1@nadine.teleport.com>


I am pleased to announce the availability of libHTML 1.00 (beta 1). 
libHTML is my answer to HTML/CGI modules.  It is available at:

	http://www.netaxs.com/~joc/perlwin32.html#libHTML

Don't let the URL fool you; this will run under any OS, not just WinNT
and Win95.  It will also soon be availbale from a CPAN site near you
(probably next week).

>From the on-line help:

            ***************************************************
This is yet another HTML/CGI module.  Why?  Well, I did not like the
way most of the other modules did things.  I wanted something more
compact, and more directed to my needs.  Besides, it's been fun!

The paradigm here is: you create a new libHTML object, complete with
destination, and any methods you invoke print to that destination. 
This is much more consise in some respects, and somewhat limiting in
others.  You can also string method calls together.

For example, in Lincoln Stein's CGI.PM you would say something like:

        $query = new CGI;
        open OUT ">out";
        print OUT $query->hr;
        print OUT $query->h3("Reviews");
        print OUT $query->em("What a silly art exhibit!");
        print OUT $query->a({href=>"silly.html"}, "Silly");

whereas in libHTML you would say:

        $h = new libHTML("out");
        $h->HR->H3("Reviews");
        $h->EM('What a silly art exhibit!')->A("Silly", HREF => "silly.html");

NOTE: This module assumes that you have a working knowledge of HTML,
and only facilitates its use in a perl script.  If you don't know
HTML, you will have trouble using this module.

            ***************************************************

Features

   * provides a way to easily construct HTML tags from within a perl script
   * all tags generated are HTML 3.2 compliant
   * allows the programmer to string together CGI/HTML commands for more
     compact code
   * provides many easy to use aggregate HTML methods, aggregate CGI
     methods, and aggregate FORM methods
   * provides debugging methods
   * allows for different output environments (EOL markers for UNIX, PC, MAC)
   * when run from the command line, scripts will prompt for CGI
     parameters, if desired.

Limits

   * the following HTML 3.2 tags are missing from the package: APPLET, B,
     BIG, BLOCKQUOTE, CITE, CODE, DFN, DIR, DIV, I, ISINDEX, KBD, LISTING,
     MAP, MENU, SAMP, SCRIPT, SMALL, STRIKE, SUB, SUP, TT, XMP (*)
   * several of the more esoteric attributes for some of the tags are
     missing still (*)
   * does not escape/encode ISO Latin 1 character set (*)
   * EndHTML doesn't do much (yet)
   * silently ignores non-HTML 3.2-compliant attributes
   * cannot handle multipart/form data
   * not sure if this works with PerlIS (Win32 only)

(*) minimum ship criteria for module to leave Beta status.

Future

   * fix above limitations, approximately in the above order or as
     requested
   * tieing two objects togther
   * dup-ing existing libHTML object
   * enable some basic context-dependent HTML 3.2 validation (not just
     tags-based validation, which it does now)

            ***************************************************

Regards,


joe
joc@netaxs.com

------------------------------------------------------------------------------
       Llama Fresh Farms => http://www.netaxs.com/~joc
 Gay Media Resource List => http://www.netaxs.com/~joc/gaymedia.html
          Perl for Win32 => http://www.netaxs.com/~joc/perlwin32.html
       PerlRing Homepage => http://www.netaxs.com/~joc/perlring.html
------------------------------------------------------------------------------
                       Live Free, that's the message!
------------------------------------------------------------------------------




------------------------------

Date: 12 Apr 1997 16:15:45 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Crypt function doesn't appear to work
Message-Id: <5iocfh$6ul@pirate.shu.edu>

friedman@medusa.acs.uci.edu (Eric D. Friedman) writes:

>use subs qw(randalphanum);

This one 'l' spelling is really catching on :-)

David Black
dblack@icarus.shu.edu


------------------------------

Date: 12 Apr 1997 16:14:49 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Crypt function doesn't appear to work
Message-Id: <5iocdp$6t9@pirate.shu.edu>

Hello -

"Jeff Thistle" <jthistle@cancom.net> writes:

>I've written a routine that is _supposed_ to encrypt a string that a user
>enters and add it to a .passwd file for use by NCSA Basic Authentication.

>The program updates the mentioned .passwd file with a line of the form

><user>:<encrypted string>

>but when I try and access the protected directory the username/password
>combination does not work.  However, when I add entries to the .passwd file
>at the command line with htaccess it works fine.

>This is the snippet I'm using to do the encryption:

>$Salt = int(rand(100))+1;
>$Encrypted = crypt ($String,$Salt);

I suspect it has something to do with newline characters.  Are you
chomping the input?  Make sure you do, since there will be no newline
at the end of the password handed to the server.

David Black
dblack@icarus.shu.edu


 


------------------------------

Date: 12 Apr 1997 14:36:17 GMT
From: luvisi@andru.sonoma.edu (Andru Luvisi)
Subject: Gloph: A Fulltext Indexer
Message-Id: <5io6l1$fj5$1@nadine.teleport.com>

Gloph v0.01a1 is now available from http://andru.sonoma.edu/~luvisi/ .
This is an ALPHA release.  It is intended mostly so I can get feedback,
suggestions, bug reports/fixes, etc.  It seems to work so far in my
tests, but I have not tested it half as much as I'd like to, and there
are features I would like suggestions on how to impliment.

andru

Here's the README:

Gloph v0.01a1

THIS IS AN UNSUPPORTED, ALPHA RELEASE!  THE AUTHOR TAKES NO
RESPONSABILITY FOR ANY DAMAGE CAUSED BY RUNNING THIS CODE, AND MAKES
NO PROMISES ABOUT SUPPORTING OR HELPING YOU WITH IT.  USE IT AT YOUR
OWN RISK!

Gloph is a full text indexer I wrote in perl.  It is reasonably fast,
allows full boolean queries (for example: "andru & (bill | frank | (john
& dave))"), and can index the entire glibc distribution in around 15
minutes (haven't you always wondered which files have the word main but
don't use printf?).  It does *NOT* support phrases, relavence ranking,
substring searches, regular expression searches, or case insensativity.
case insensativity is a small addition I just haven't added yet.
substrings/regexp searches would be easy to add, but painfully slow
given the way the data is indexed.  phrases and relavence ranking I may
impliment someday if I ever figure it out.  Oh, and the name.  when I
was writing the boolean parser, I was using the algorythm from "The AWK
programming language" for parsing a numeric expression (eg "1+3*(5-2)"),
and it used three level recursion.  There were expressions, terms, and
nums, where a num was either a number, or (<expr>).  Well, I needed
something for a \w+ or a (<expr>) and didn't think "num" was a good
name, so I made up "Gloph".


README:
        This file

cli.pl:
        Clears the current index.

dindex.pl:
        Dumps the current index.  For debugging purposes.

query.pl
        Does a straight query, "and"ing all it's arguments together.
        for example:

        % query.pl main print include

        would print the names of all the indexed files that have the
        words "main", "print", and "include".

bquery.pl
        Does a boolean query, using only $ARGV[0].  For example:

        % bquery.pl 'andru & ( bob | ( main & joe))'

        would print out all names of all the indexed files that have
        the word "andru" in them, and also have either "bob" or both
        "main" and "joe".

countdb.pl
        Prints out the total number of words that are indexed.  For
        debugging purposes.

index.pl
        Indexes files.  For each argument that's a directory, it will
        index all files in all subdirectories of the argument, and for
        each argument that's a file, it will index that file.



USAGE:

To index an entire directory tree, just type:
% index.pl <topdir>
and wait a while.

To do a query, use either query.pl or bquery.pl.

To reindex, first run cli.pl (deletes the .gdbm files and the "filelist"
file) and then run index.pl again.  Because of the way the data is
indexed, if you want to reindex a file, you should generally clear your
current index and reindex everything.  Yes, I know this is a major
deficiency, and I'm not sure how to fix it yet.  suggestions welcome.


TECHNICAL INFO:

The index itself consists of three files:

filelist:
        this file contains a single line with a comma separated list
        of all the files which have been indexed.  it is used to
        create an array which can be indexed into with integers.

filedb.gdbm:
        this file maps filenames to their numeric position in
        filelist.  it is used by the indexer when adding new files to
        the current index or reindexing a file.

index.gdbm:
        This file contains a mapping from words to an alphabetized
        comma separated list of numbers, mapped back to files though
        filelist.  this is a crude form of data compression.


the index.pl programs works by:

reading the files to index one by one.  while going through each file,
it reads a line at a time, splits it up into words (using split(/\W+/)),
and keeps track of each word it has found by setting $index{$word} = 1.
At the end of the file, it then adds all the info to %bigindex, which
consists of the same type of info as the index.gdbm file, a mapping from
words to a comma separated list of file numbers, and then undef's
%index.  when any one of the lists in %bigindex grow beyond some size
(by default 100), they get merged with index.gdbm (tied to %fileindex)
by just appending each %bigindex entry to the end of each %fileindex
entry and undef'ing %bigindex.  this is done by the &domerge()
subroutine.  at the end, it does one last merge, and alphabetizes each
list in %fileindex.


the bqyery.pl program works by:

heh heh.  this one is a little hard to explain.  the first thing I did
was to construct the notion of a "signed list".  that is, a list of
files which are either "out" or "in".  the first number in such a list
is 0 to indicate "in" and 1 to indicate "out" (think signed
arithmetic).  the next thing is to think of each list as an infinite
set of boolean values, one for each file in all existance.  for the
positive lists, the value is TRUE for each element in the list and
FALSE for each element not in the list.  for the negative list, the
value is FALSE for each element in the list, and TRUE for each element
not in the list.  This makes it possible to perform basic boolean
operations on signed lists, namely "not", "and", and "or".  These
operations are implimented using standard logical joins (possible
because the lists are all stored in alphabetical order) of the "in
both", "in either", and "in one but not the other" variety, and
setting the sign bit of the result properly.  the parser is, as
already mentioned, pretty much straight out of "The AWK programming
language", by the inventers of AWK.  well, the algorythm is, anyway.
the code didn't work since it was in a different language, but you
knew that already.  at the very end of parsing, if the resulting list
is a negative list, rather than trying to return every file which
isn't in the list, it just warns that the total expression has to have
a positive truth value.  if the list is positive, it converts each
file number into a file name, and prints them all out.





------------------------------

Date: 12 Apr 97 14:00:31 GMT
From: "David Perdue" <dperdue@vec.net>
Subject: help with Perl boundaries
Message-Id: <01bc4749$76d3ada0$ad2185d0@perdue-1>

Hi

I working my way thru  the "Learning Perl" book and I've run into a
problem.

>From the Perl Book:

/\b\+/\b/;  # matches "x+y" but not "++" or " + "

I really don't get this. to me the expression means that it is trying to
match a "+" with a boundary in each side. or " + ".  Could someone help me
out here?


Second example from the Perl book:

/abc\bdef/;  #never matches (impossible for boundary here)   

Why wouldn't the string  "abc def" be a match? would not the space between
"c" and "d" be the boundary?

Your help is appreciated greatly!

--dp


------------------------------

Date: 12 Apr 1997 14:13:25 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: help with Perl boundaries
Message-Id: <5io5a5$gjo@lyra.csx.cam.ac.uk>

David Perdue <dperdue@vec.net> wrote:
>
>/\b\+/\b/;  # matches "x+y" but not "++" or " + "
>
>I really don't get this. to me the expression means that it is trying to
>match a "+" with a boundary in each side. or " + ".  Could someone help me
>out here?

A boundary is a place with a word character (i.e. [a-zA-Z0-9_]) on one
side and a non-word character on the other (and the start/end of the string
also count as boundaries).   In the re, "+" is a non-word character, so
to have boundaries on each side, it must be surrounded by word cyaracters
as in "x+y".

>/abc\bdef/;  #never matches (impossible for boundary here)   
>
>Why wouldn't the string  "abc def" be a match? would not the space between
>"c" and "d" be the boundary?

Here the re requires "c" and "d" adjacent, with a boundary between them.
But this is impossible, so it never matches.


Mike Guy


------------------------------

Date: Sat, 12 Apr 1997 15:30:00 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: HELP: Recursive directory mapping
Message-Id: <E8J720.CG1@world.std.com>

"Ameer Badri" <abadri@worldnet.att.net> writes:

>I will appreciate if someone can help me with the following problem.   I am
>looking for piece of  Perl code to recursively map a given directory for a
>specific file type (ex. *.html).

#!/usr/bin/perl 

use File::Find;

find \&wanted, '.';

sub wanted {
  return unless /\.html$/;
  print "$File::Find::name\n";
}
-- 
Andrew Langmead


------------------------------

Date: 12 Apr 1997 14:14:13 GMT
From: duncan@sapio.co.uk (Duncan Harris)
Subject: Re: IIS: Perl CGI's execing command line progs, can't read from pipe
Message-Id: <memo.970412151402.142A@sapio.compulink.co.uk>

In article <riohbmza8a.fsf@viman.com>, gandalf@viman.com (Matt Cline) 
wrote:

> On IIS 2.0 under NT 4.0, using Hip Perl:
> 
> If I make a Perl script that does something like:
> 
>   # Execute foo.pl, read ouput for command from PIPE.
>   open(PIPE,"perl foo.pl |");
>   while(<PIPE>) {
>     blah
>     blah
>     blah
>   }
>   close(PIPE);
> 
> I won't get any output from the command that I've executed (I can't
> read anything out of the PIPE file handle) if I invoke this as a
> CGI script under IIS; it works just fine if executed from the command
> line or from other web servers.

Check the registry setting in:

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters

Value: 

   Value Name: CreateProcessWithNewConsole
   Data Type: REG_DWORD
   Data Value = 1

See if it works then. This is documented in the MS Knowledge base.

--
Duncan Harris, Sapio Design Ltd, Manchester, U.K.
~~~~~~~~~~~ mailto:duncan@sapio.co.uk ~~~~~~~~~~~
Web on CD-ROM?  Check out http://www.sapio.co.uk/


------------------------------

Date: Fri, 11 Apr 1997 09:41:31 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Kudos to Tom Christiansen and problems with OO
Message-Id: <fl_aggie-ya02408000R1104970941310001@news.fsu.edu>

In article <5iivqh$rt0$1@NNTP.MsState.Edu>, billy@cast.msstate.edu (Billy
Chambless) wrote:

+ You're absolutely right! I think you should file a formal complaint with
+ the Usenet Cabal, Answer Obligation Division. I'll bet they end up
                  ^^^you forgot (TINC)

+ firing half the newsgroup.

Nah, they'll refer it to the Cabal's (TINC) Dirty Tricks arm...

+ It's union rules. CGI questions in this group can be answered by
+ anybody, including apprentices and Snotty Answer Specialists, while

I used to think I was a journeyman, but I am working my way up to 
Snotty Answer Specialist (SAS). Perl with attitude!

+ OO questions have to be answered by either an OO Specialist 1, or
+ a General Wizard. 

I'm neither, ergo why I didn't answer. He wanted a correct answer, yes?

+ All of you, go sit in the corner and write csh scripts until you've
+ learned to behave!

Grrrrrrrrrrrrrrrrr!

James - go take your csh scripts and shove 'em...where they won't see
        the light of day...

-- 
Consulting Minster for Consultants, DNRC

To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


------------------------------

Date: 12 Apr 1997 14:01:40 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Negative lookahead and nested stars BUG?
Message-Id: <5io4k4$g0u@lyra.csx.cam.ac.uk>

Vincent Partington <vinny@nmg.nl> wrote:
>
>While messing about with regexpes for parsing HTML documents I think I
>stumbled upon a bug. It concerns the following script:
 [snip]
>The only difference between $re1 and $re2 is the nested stars in $re1. The
>'bug' only comes up when a substring matches the regexp up to the negative
>lookahead and then does not match that.

If the operand of * can match a null string, it will be able to match
infinitely many times, so the matching process loops.  Perl 5.004beta
detects this, so your example produces

trying re2 on simple text
trying re2 on complex text
trying re1 on simple text
/\[if\b((?:[^\]'"]*|(['"]).*?\2)*)\](?!\])/: regexp *+ operand could be empty at - line 12.

and stop.


Mike Guy


------------------------------

Date: Sat, 12 Apr 1997 10:33:27 -0400
From: Chris Trimble <trimble@walrus.com>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <334F9D37.799@walrus.com>

As much as I think there's something to be debated about JO's
assertions...

Steffen Beyer wrote:

> >      - It is possible to make languages with execution
> >     speeds like C or C++, that use dynamic typing
> >     successfully, whilst being high-level enough in the
> >     creation of abstractions to "glue" things together quite
> >     nicely and easily.
> 
> Yes: Perl.

 No, not Perl.  Perl's execution speed is three to four orders of
magnitude slower than comparable C code.  I can't vouch either way for
the Perl compiler.  I also have my doubts as to Perl's status as a
dynamically typed language.  Yes, you can make a variable and set it to
anything;  but, the fact that you must have a different comparison
operator depending if you're comparing strings or numbers says something
against its dynamicism.

 
> > The white paper argues that you can't have a jack-of-all-trades
> > language.  Either you have a strongly typed language, which
> > gives high speed and manageability but makes gluing hard,
> > or you have a weakly typed language with the opposite properties.
> 
> IMHO, "tertium non datur" doesn't hold for Perl...
> 
> Because the philosophy of Perl is quite distinct from all
> other programming languages (see the interview of Larry
> Wall and Tom Christiansen in WebWeek - a link to the
> article can be found by following links down from www.ora.com),
> it combines high speed, manageability and maintainability
> (if so written, that is), *and* easy gluing (see "How Perl
> saved the human genome project" in "The Perl Journal", for
> instance).
> 
> And Perl actually *is* sort of a "jack-of-all-trades" language...

 I'm sorry, Perl is not a jack of all trades.  It is an abhorrent
language for large projects that demand maintainability, and even LW and
TC would agree with that statement.  I have three programmers right now
trying to rid our company of thousands of lines of unmaintainable Perl
code.  The scariest part is, some of that code is my own, and I am one
of the most anal style programmers at the company (30 character function
names are not uncommon).  The problem is, Perl does not scale.  You can
write great small programs in it, and I still do, but you cannot grow
the code in any maintainable fashion.  One of the programmers is a Perl
fan, but even he agrees that attempting to write this system in Perl was
a mistake.

 Perl has its place --  as do Tcl, Python, C++, Scheme, and Self -- and
is great for certain tasks.  But, I agree with Ousterhout on this one:
there is no end-all-be-all language out there.  

 Now his thing about implementation inheritance not increasing code
reuse, that I have a problem with.  I do think that once hierarchies
become too complex, implementation inheritance does become more of a
problem than a benefit, and has the effect JO is talking about.  But, if
the OO nature of a language is used to create minimal hierarchies --
many flattened hierarchies, with at most 2 levels, not necessarily
attached to a common root -- I have found that implementation
inheritance can be an incredible, maintainable tool.

 - Chris


------------------------------

Date: Fri, 11 Apr 1997 13:12:34 -0600
From: Bryan Oakley <oakley@healthcare.com>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <334E8D21.500F9F30@healthcare.com>

Tom Christiansen wrote:
> In comp.lang.perl.misc,
>     rv@erix.ericsson.se (Robert Virding) writes:
> :A final question which has long interested me and which seems relevant
> :to this whole discussion: who would use Tcl if it DIDN'T have such a
> :integrated interface to Tk?
> 
> The people using it for expect.

I'm sure the crowd would be much greater than just the expect users out
there. There are many products out there that use tcl as an extension /
macro language. Products which don't necessarily use Tk. Ours uses tcl
as an extension language in the core product as well as using an
extended 'wish' for the GUIs. The fact that we embed tcl is what makes
our product better than our competition's (in our opinion anyway). 

I for one will always consider embedding tcl in any future projects I'm
involved in. It's just flat the best embeddable language out there. Not
the most powerful, not the most efficient. But best nonetheless (IMHO)
for the end-user. I am a user interface designer / developer, and part
of an applications "user interface" is it's scripting interface if it
has one. So, I tend to approach scripting languages from the end-user's
point of view. I am firmly convinced that tcl provides  an end user with
the most power for the smallest amount of (the end user's) time
invested.

Perl is great for what perl is, but I don't particularly care for it as
language embedded in other programs. Lisp variants have a special place
in my heart (I admit, I *love* lisp in almost all of its forms and have
written my share of lisp), but lisp isn't a very user-friendly scripting
language. To me, the biggest drawback in embedding lisp in a commercial
product is that list pretty much requires a text editor that knows a
little about lisp syntax.


-- 
Bryan Oakley                     mailto:oakley@healthcare.com
Software Engineer                http://www1.clearlight.com/~oakley/
Healthcare Communications, Inc.  http://www.healthcare.com/


------------------------------

Date: 12 Apr 1997 16:20:00 GMT
From: "Jeff Oien" <jeffo@execpc.com>
Subject: Re: Perl-Books.
Message-Id: <01bc475e$6bc4f8a0$b642cfa9@Pjeffo.execpc.com>


> I> Indeedly doodlie! My [comments] follow.
> 
> I> Learning Perl, Randal L. Schwartz, ISBN 1-56592-042-2.
> 
> I> [a kindler, gentler introduction, suitable for people learning their
first
> I>  programming language, AKA the llama]
> 
> As much as I'd like that to be true, that's not the case.  The llama
> does *not* teach fundamental programming concepts, such as "what is a
> variable", "what is an array", and "why would I need a subroutine".
> My book was intended as a crossover,
> requiring some other algol-like languge (C, Pascal, Fortran, BASIC)
> before stumbling in.
> 
> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095

I found that out the hard way. I'm going thru the Llama book and
Creating Cool Web Pages Using Perl but I would like one more 
book to really get the absolute basics down. 2 that I have seen are
Perl for Dummies and Perl 5 by Example (Que). Anyone have any comments
on these or any others for non-programmers?

Thanks,
-- 
Jeff Oien, WebDesigns
http://www.execpc.com/webdesigns/
jeffo@execpc.com




------------------------------

Date: 12 Apr 1997 13:58:57 GMT
From: "Santiago Alvarez Rojo" <santiago@gambito.com>
Subject: PLEASE HELP
Message-Id: <01bc474b$e6a62a20$875035c3@jimmy.iponet.es>

I'm trying to install Kevin Johnson's MailFolder Module and can not find
any perl5.003_97 anywhere as he says in the readme file
(/CPAN/authors/id/KJOHNSON/MailFolder-0.06.readme).

I've downloaded the last version from CPAN but it is not 5.003_97. Where
can I find it?

TIA
-- 
Santiago Alvarez Rojo
     santiago@gambito.com
     http://www.gambito.com/santiago
-----------------


------------------------------

Date: Sat, 12 Apr 1997 15:34:59 +0100
From: cyber_surfer@gubbish.wildcard.demon.co.uk (Cyber Surfer)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <MPG.db94352e7d0ef75989761@news.demon.co.uk>

With a mighty <334E8E59.6AFD@nospan.netright.com>,
david@nospan.netright.com uttered these wise words...

> 	Sorry, But I'm a developer, and I picked my development language,
> enviornemnt and tools, all by my lonesome.  

Good for you! My employer picked VB, Java, and C++. I'm currently 
compromising, by using Java. My first choice is Lisp, but it isn't on 
the list. Nor is Tcl, for the same reasons.

I don't think that this is unusual, but please let me know if it is.
-- 
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
  Martin Rodgers | Programmer and Information Broker | London, UK
             Please note: my email address is gubbish.


------------------------------

Date: Sat, 12 Apr 1997 15:35:03 +0100
From: cyber_surfer@gubbish.wildcard.demon.co.uk (Cyber Surfer)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <MPG.db948f77f6114de989762@news.demon.co.uk>

With a mighty <5imkr2$l1o@mimsy.cs.umd.edu>,
clin@cs.umd.edu uttered these wise words...

>      And suddenly, we're going to see this quote in the preface
> of every Scheme book out there.    All 3 of them.

Hey, you only need _one_. My choice would be SICP, but it could easily 
be a personal thing. For C, as far as I'm concerned there's only one 
book, and that's the _1st edition_ of K&R. The 2nd ed. lost too many 
important nuggests of wisdom, despite the gain of a few gems. It's a 
tough choice, but I'd rather have the extra warnings and tips.

Still, YMMV, and I expect it does. I'd worry if there was only _one_ 
way of looking at things, so Your Mileage _Should_ Vary. This is the 
way in which memes adapt and evolve in a changing world.

BTW, I added JO's quote to my Tcl page. ;)
-- 
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
  Martin Rodgers | Programmer and Information Broker | London, UK
            Please note: my email address is "gubbish".


------------------------------

Date: Sat, 12 Apr 1997 11:53:06 -0400
From: "Andrew P. Mullhaupt" <amullhau@ix.netcom.com>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <334FAFE2.8AD@ix.netcom.com>

Cyber Surfer wrote:
> 
> With a mighty <334E8E59.6AFD@nospan.netright.com>,
> david@nospan.netright.com uttered these wise words...
> 
> >       Sorry, But I'm a developer, and I picked my development language,
> > enviornemnt and tools, all by my lonesome.
> 
> Good for you! My employer picked VB, Java, and C++. I'm currently
> compromising, by using Java. My first choice is Lisp, but it isn't on
> the list. Nor is Tcl, for the same reasons.
> 
> I don't think that this is unusual, but please let me know if it is.

Lots of programmers find themselves constrained by the employer's choice
of language. A choice which is frequently insane and regrettable.

In case anyone wonders out there how employers think, I'll give myself
as an example.

We are a real-time trading organization with a lot of technology
leverage and a lot of programming chores which need to be done on the
fly. But we also carry out very high performance scientific
computations. I happen to be the guy who gets to pick the languages, and
the programmers report to me. I also happen to be the guy who develops
the high performance scientific computations, so there are research
types (who _think_ they can write code, but, uh, well, ...right). The
research types also report to me.

So if I felt like it, I could have everyone program in GOTRAN II.

But, since I'm trying to make things go, I don't pick the languages, I
_suggest_ them. Like, a couple years ago I thought it would be good to
see if Tcl/TK/expect was a good choice, so I had a programmer learn it
and decide if it was useful. It turned out to be much better than C++
(which was his original idea) so he uses Tcl/TK/expect for our entire
trading system interface. We still have some stuff in C, and some shell
scripts, but Tcl/TK/expect basically took over the user interface world.

In the research side, we use S, APL, C, and Fortran. It's a lot better
for me to have the high-priced researchers doing research instead of
learning a new language, so we pretty much let things go all over the
place in research. But when we put stuff into production, we have to cut
the choice down a little. We generally have to re-implement it anyway
(and this turns out to be a _good_ thing more than a _bad_ thing) so
it's not a problem.

As a result, we maintain about 10K or 20K lines or code to do work
similar to that which at one of my previous firms took close to 1M lines
of straight C.

So do I have a "big" project? Except for the number of lines of code,
_yes_, especially since I've seen this type of stuff take close to 1M
lines of C. But by creative and flexible choice of language, we have to
maintain only about 2% of that amount of code, and better yet, only
about half of our code is mission-critical.

So when you wonder if a language "scales" worry more about how the
project might not have to scale in the right choice of language.

Now at the moment, we're looking at whether or not we can consolidate
some of our development by finding a language which can support more of
our common needs between research and production, and among other
candidates, Python with Numerical Extensions is the reason I participate
in this newsgroup. I started a few months ago, and about three of us are
looking into this possibility. I expect it will be another three or four
months before we really know if Python is a piece of the puzzle for our
future, and this will be apparent more from if the people who are
already doing the work in other languages choose to defect to Python
more than anything else.

This approach has worked out pretty well, and I would recommend it to
other people.

Later,
Andrew Mullhaupt


------------------------------

Date: Sat, 12 Apr 1997 07:21:35 -0700
From: "Charles F. Ritter" <critter@quack.kfu.com>
Subject: Re: Running Perl script w/i Unix Shell Script
Message-Id: <334F9A6F.1A869BE4@quack.kfu.com>

I R A Aggie wrote:
> 
> In article <5iiq0f$d0a@cronkite.ocis.temple.edu>,
> david@temss2.main.temple.edu (David Tucker) wrote:
> 
> + Can you run a perl script within a UNIX shell script  without having
> + to preface all Perl variables starting with a $ i.e. $a with
> + a backslash i.e. \$a.
> 
> Huh? I know what you mean, but I don't understand why you're trying to
> do it that way.
> 


I have a similar problem. I have to call/run a program in the background
that takes it's input from exported shell variables. Unless I have a
means to export variables from perl I did to go back to my shell.


------------------------------

Date: 12 Apr 1997 01:51:17 GMT
From: c.c.eiftj@88.usenet.us.com (Rahul Dhesi)
Subject: Re: Split a line on "^M"
Message-Id: <5impql$84p@samba.rahul.net>

In <5imktp$h09@fridge-nf0.shore.net> nvp@shore.net (Nathan V.
Patwardhan) writes:
>Do these lines end in \r\n or just \r?

Note that by definition lines always end with \n .

If lines end with \r, it simply means that \n is defined as \r.

Thus lines can end with \r\n (which means there is a \r at the end
of each line, just before the terminating \n), or with \n, or with
\r where \r is synonymous with \n.  But lines cannot end with
\r without ending with \n.
-- 
Rahul Dhesi <dhesi@spams.r.us.com>
a2i communications, a quality ISP with sophisticated anti-junkmail features
** message body scan immune to fake headers ***   see http://www.rahul.net/
>>> "please ignore Dhesi" -- Mark Crispin <mrc@CAC.Washington.EDU> <<<


------------------------------

Date: 12 Apr 1997 16:49:32 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <5ioees$gvr$1@info.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 05 Apr 1997 08:51:28 GMT and ending at
12 Apr 1997 06:15:21 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^(>|:|\S+>)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" e-mail address and name.

Excluded Posters
================

perlfaq-suggestions@mox.perl.com

Totals
======

Total number of posters:  551
Total number of articles: 1125
Total number of threads:  429
Total volume generated:   2156.8 kb
    - headers:    859.8 kb
    - bodies:     1194.1 kb (851.4 kb original)
    - signatures: 100.2 kb

Averages
========

Number of posts per poster: 2.0
Number of posts per thread: 2.6
Message size: 1963.2 bytes
    - header:     782.6 bytes
    - body:       1086.9 bytes (775.0 bytes original)
    - signatures: 91.2 bytes

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   33    71.0 ( 21.1/ 49.9/ 25.1)  Tad McClellan <tadmc@flash.net>
   31    44.9 ( 18.2/ 26.7/ 21.4)  Nathan V. Patwardhan <nvp@shore.net>
   28    53.7 ( 22.5/ 26.7/ 20.0)  Tom Christiansen <tchrist@mox.perl.com>
   23    34.7 ( 15.7/ 17.1/ 10.9)  Russ Allbery <rra@stanford.edu>
   15    21.1 (  9.2/ 11.8/  7.0)  Geoffrey Hebert <soccer@microserve.net>
   14    20.2 (  8.0/ 12.2/  6.0)  David Alan Black <dblack@icarus.shu.edu>
   13    25.4 (  9.2/ 11.4/  6.1)  Randal Schwartz <merlyn@stonehenge.com>
   12    18.9 (  9.7/  9.3/  6.8)  Tom Phoenix <rootbeer@teleport.com>
   12    32.1 (  9.1/ 17.9/ 10.0)  Jong <jong@mrc-lmb.cam.ac.uk>
   11    35.8 ( 14.4/ 18.2/  7.8)  "Tim Behrendsen" <tim@a-sis.com>

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  71.0 ( 21.1/ 49.9/ 25.1)     33  Tad McClellan <tadmc@flash.net>
  53.7 ( 22.5/ 26.7/ 20.0)     28  Tom Christiansen <tchrist@mox.perl.com>
  44.9 ( 18.2/ 26.7/ 21.4)     31  Nathan V. Patwardhan <nvp@shore.net>
  35.8 ( 14.4/ 18.2/  7.8)     11  "Tim Behrendsen" <tim@a-sis.com>
  34.7 ( 15.7/ 17.1/ 10.9)     23  Russ Allbery <rra@stanford.edu>
  32.1 (  9.1/ 17.9/ 10.0)     12  Jong <jong@mrc-lmb.cam.ac.uk>
  27.4 (  6.0/ 18.3/ 13.8)     10  mike@stok.co.uk
  26.3 (  9.4/ 16.9/  8.8)     11  Douglas Seay <seay@absyss.fr>
  25.4 (  9.2/ 11.4/  6.1)     13  Randal Schwartz <merlyn@stonehenge.com>
  24.1 (  6.1/ 17.0/ 13.5)      5  Cyber Surfer <cyber_surfer@gubbish.wildcard.demon.co.uk>

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   75  Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
   59  Unix and ease of use  (WAS: Who makes more ...)
   47  Ousterhout and Tcl lost the plot with latest paper
   23  Who makes more $$ - Windows vs. Unix programmers?
   17  No GUI environment for Perl?
   11  @array as input symbol in <@array>
    9  Kudos to Tom Christiansen and problems with OO
    9  Unix and ease of use (WAS: Who makes more ...)
    9  Holy Wars! (was: Perl vs C++, Unix vx MS, etc)
    8  Split and Print?

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

 217.6 ( 86.7/126.2/ 82.9)     75  Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
 162.1 ( 80.8/ 75.0/ 41.2)     59  Unix and ease of use  (WAS: Who makes more ...)
 158.2 ( 53.2/101.3/ 77.1)     47  Ousterhout and Tcl lost the plot with latest paper
  55.1 ( 29.3/ 23.2/ 14.2)     23  Who makes more $$ - Windows vs. Unix programmers?
  27.5 ( 11.9/ 14.4/  9.5)     17  No GUI environment for Perl?
  22.7 (  6.3/ 15.4/ 11.1)      9  Kudos to Tom Christiansen and problems with OO
  22.1 ( 12.3/  8.8/  4.6)      9  Unix and ease of use (WAS: Who makes more ...)
  21.5 (  3.8/ 17.7/  9.1)      6  Can It Be Done
  20.8 (  7.2/ 12.0/  6.2)     11  @array as input symbol in <@array>
  15.4 (  8.0/  6.5/  3.7)      7  TCL & interface definitions (was Re: Ousterhout and Tcl lost the plot with latest paper)

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

     222  comp.lang.c++
     220  comp.lang.tcl
     138  comp.lang.python
     138  comp.lang.eiffel
     138  comp.lang.lisp
     137  comp.lang.functional
     137  comp.lang.scheme
     132  comp.lang.scheme.scsh
      96  comp.unix.advocacy
      95  comp.lang.c

Top 10 Crossposters
===================

Articles  Address
--------  -------

     141  "Tim Behrendsen" <tim@a-sis.com>
      97  Hume Smith <hclsmith@tallships.istar.ca>
      87  Kaz Kylheku <kaz@vision.crest.nt.com>
      64  tw104@york.ac.uk
      56  Graham Matthews <graham.matthews@maths.anu.edu.au>
      54  seebs@solon.com
      52  Steve Mading <madings@earth.execpc.com>
      51  fred@genesis.demon.co.uk
      45  Darin Johnson <darin@usa.net.delete_this_part>
      40  Erik Naggum <erik@naggum.no>


------------------------------

Date: Sat, 12 Apr 1997 07:03:41 -0700
From: "Charles F. Ritter" <critter@quack.kfu.com>
Subject: Re: unable to execute ?
Message-Id: <334F963D.38043BD5@quack.kfu.com>

Ken Hodges wrote:
> 
> I am running: windows NT
>  Netscape's Enterprise server
> Metainfo's "Sendmail for NT"
> Perl5
> 
> Here is the script I am trying to get to work:
> #!/usr/bin/perl
> 
> ############################################################
> #                        mailto.cgi
> #                           v1.2.5
> #                      Meng Weng Wong


I don't believe NT supports this "splat bang" notation: #!/usr/bin/perl.
Am I wrong?


Charles Ritter

Microsoft NT - when they are finally finished it will be the best
documented unix operating system on the market.


------------------------------

Date: Sat, 12 Apr 1997 11:53:27 -0400
From: Jim Becker <jbecker@erols.com>
Subject: Re: Unique Filename
Message-Id: <334FAFF7.5472@erols.com>


Dan Louderback wrote:
> 
> Anyone have ideas on how to generate unique filenames limited to 8.3
> notation?
> 
> Regards,
> Dan

How about something like this:

do { $filename = int(rand(99999999)) . ".txt" }
until !-e $filename;

Jim Becker


------------------------------

Date: Sat, 12 Apr 1997 11:09:18 -0400
From: "Dean Z. Douthat" <dean@cyberzone-inc.com>
Subject: Re: Unix and ease of use  (WAS: Who makes more ...)
Message-Id: <334FA59E.672B@cyberzone-inc.com>


Steve Mading wrote:

> The best way to count code would be to have something hooked into
> the compiler so that the 'lex' part of the compiler could tell you
> how many distinct 'tokens' were encountered.  This would be easy to
> implement too, and has the added advantage of being able to ignore
> the comments easily.
For C or C++

fgrep \; | wc -l

Slightly conservative but easy. :-)
-- 
Dean Z. Douthat
Osiris Business Systems
PO Box 7571 Ann Arbor MI  48107-7571
(313)747-9170


------------------------------

Date: 12 Apr 1997 15:24:41 GMT
From: "Tim Behrendsen" <tim@a-sis.com>
Subject: Re: Unix and ease of use  (WAS: Who makes more ...)
Message-Id: <01bc4755$d60b7a80$32ee6fcf@timhome2>

Tuomo Takkula <tuomo@cs.chalmers.se> wrote in article
<sfj208h5q28.fsf@muppet17.cs.chalmers.se>...
> 
>  "Tim Behrendsen" <tim@a-sis.com> writes:
>  
>  > But I don't even need to go there.  Name one freely available
>  > *significant* product that is *clearly* better than *any* commercial
>  > product, regardless of price.  There are some good programs of limited
>  > size that are not worth a commercial entity rewriting (some may
>  > say Emacs, but I wouldn't...), but I mean products of significant
>  > size and complexity.
>  
> What about ghostscript/ghostview/ppmtools? Dealing with Adobe
> Postscript better than Adobe (and any other commercial company) 
> and heaviliy used in virtually any university/company running Unix,
> perhaps TeX, and having a Postscript printer? Writing a reliable
> Postscript interpreter/viewer is surely no afternoon task.

Unless they have dramatically improved ghostscript lately, it is
not better than the "real thing", at least it always seems to have
formatting problems when I try and use it.

Still, if ghostscript did the job, why wouldn't printer manufacturers
use it instead of licensing code from Adobe?

-- 
=========================================================================|
| Tim Behrendsen (tim@a-sis.com)        | http://www.cerfnet.com/~timb   |
| "Judge all, and be prepared to be judged by all."                      |
=========================================================================|


------------------------------

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 288
*************************************

home help back first fref pref prev next nref lref last post