[8901] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2518 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 6 16:20:15 1998

Date: Wed, 6 May 98 13:00:27 -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           Wed, 6 May 1998     Volume: 8 Number: 2518

Today's topics:
    Re: 256 char limitation? (Mike Wescott)
    Re: Another Odd Regexp Question - Buggy Behaviour? <dballing@speedchoice.com>
    Re: Another Odd Regexp Question - Buggy Behaviour? (Ilya Zakharevich)
    Re: Bad free() ignored -- latest Perl not an option <andy@wonderworks.co.uk>
        Converting Perl to C (Jimmey Todd)
    Re: Converting Perl to C <tchrist@mox.perl.com>
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Clinton Pierce)
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Chris Nandor)
    Re: Documentation Software for Perl <aqumsieh@matrox.com>
    Re: Embedded systems programming (Hugh Dunne)
    Re: Ever Wonder Why Not Everyone Uses Modules? <p-ciccone@usa.net>
    Re: Ever Wonder Why Not Everyone Uses Modules? <upsetter@shore.net>
    Re: Ever Wonder Why Not Everyone Uses Modules? (Craig Berry)
    Re: GDBM in perl-5.004 ???? baiju@bst.net
    Re: Help choosing names =~ Perl-SQL <steve.tolkin@fmr.com>
    Re: help needed with regular expression <kmiles@erols.com>
    Re: help needed with regular expression (brian d foy)
    Re: how do you do to extract the title of a .html docum (brian d foy)
    Re: how do you do to extract the title of a .html docum (brian d foy)
    Re: mirroring sites with a perl script (brian d foy)
    Re: Need simple way to define numerical output accuracy <aqumsieh@matrox.com>
    Re: problem reading DB_File on win32 platform baiju@bst.net
    Re: problem reading DB_File on win32 platform <gmarzot@baynetworks.com>
    Re: Query: Replicating a Vi command (Mike Heins)
        running perl as a service? <thaddeus@goofy.activework.com>
    Re: running perl as a service? <rasmusin@WPI.EDU>
    Re: running perl as a service? <ron@ckm.ucsf.edu>
    Re: running perl as a service? (Mark-Jason Dominus)
    Re: SF.pm perl user's group! <lanier@shell6.ba.best.com>
    Re: Using executable pathname to define include path <tchrist@mox.perl.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 06 May 1998 15:33:22 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: 256 char limitation?
Message-Id: <x4ogxbi48t.fsf@cygnus.ColumbiaSC.NCR.COM>

In article <x4ra27ic1v.fsf@cygnus.ColumbiaSC.NCR.COM> I wrote:
> In article <6inbnn$rnh@newsops.execpc.com> N/A <pittdno@spamexecpc.com> writes:
>>   1) The problem is that if I try to send more than 256 chars from the
>>   client to the server, the first 256 get lost and only the chars after

> Solaris limitation/bug/feature (take your pick), also present in other
> SysVr4-derived OS's. It is, I believe, a limitation in the pseudo-tty
> code  [...]

Looks like the limitation is in the ldterm streams module which limits
canonical processing to MAX_CANON (256) characters (see sys/param.h) and
throws it all away and starts over again when that limit is exceeded.

-- 
	-Mike Wescott
	 mike.wescott@ColumbiaSC.NCR.COM


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

Date: Wed, 06 May 1998 13:03:50 -0500
From: Derek Balling <dballing@speedchoice.com>
Subject: Re: Another Odd Regexp Question - Buggy Behaviour?
Message-Id: <B6B087CE7A374B15.60A84CC55288E5DD.32297D1850D47EFF@library-proxy.airnews.net>

Mark Schmick wrote:
> 
> Derek,
> 
> Your question in incomplete. Based on the information provided,
> nothing should go wrong. For instance, I cut-n-pasted to create
> the following script:
> 
> Meaning that both regex's worked just fine. You should probably
> post *exactly* the code you're using, and *exactly* the data set
> being processed. It could be that "modem 99999" is actually
> "modem\n99999" or something(?), so you'd want "\s" in your regex
> rather than a space. But that's a wild guess, in lieu of more
> information.

I understand what you're saying, (and the problem here is
that browsers word-wrapping really prevents VERBATIM
posting), so what I'll do is repost the exact data,
including the newlines where they actually exist, so that
people attempting to recreate the code can do so. :)

DATASET1
-----------
\n
A request has been made to provision modem 99999, a CCM201\n
modem, with 10 usable IP addresses for Cablemaster ID
PCTV.\n
REQUESTOR: derek\n
RESPONSIBLE: foobar\n
\n
Downstream:     PHOENIX SIF2QAM1\n
Upstream Modem: 602-264-1854\n
Call Waiting? : NO\n
Customer Name : Test USer\n
Address1:       77777 Do Not Create\n
Address2:       Phoenix AZ 88888\n
Address3:\n
Phone Number:   550-555-5555\n
\n
------------

DATASET2
------------
\n
A request has been made to provision modem 99999, a CCM201\n
modem, with 10 usable IP addresses for Cablemaster ID
PCTV.\n
REQUESTOR: derek\n
RESPONSIBLE: foobar\n
\n
Downstream:     PHOENIX SIF2QAM1\n
Upstream Modem: 602-264-1854\n
Call Waiting? : NO\n
Customer Name : Test USer\n
Address1:       77777 Do Not Create\n
Address2:       Phoenix AZ 88888\n
Address3:\n
Phone Number:   550-555-5555\n
\n
------------

The exact section of code that is being executed is:
----------------------------------------------------
 $cmid = $1 if $request =~ /(\d{6}\-\d{2})\./g;
 $cmid = 'PCTV' if $request =~ /(pctv)/ig;
           # If pctv is found in the body at all,
           # then its an internal request, so ignore
           # any Cablemaster ID we may have found
 $uuid = $1 if $request =~ /modem (\d{5,6})/g; 
print STDERR "$cmid $uuid" if $DEBUG;
----------------------------------------------------

The flags at the end of the $uuid assignment line have
varied through different attempts to make this work, so I'm
not sure if what's there NOW is what I've posted in the
past. Either way, this DOESN'T work as of a few minutes ago.
:)

Hope this helps you help me track it down. :)


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

Date: 6 May 1998 19:01:24 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Another Odd Regexp Question - Buggy Behaviour?
Message-Id: <6iqc24$phj$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Derek Balling 
<dballing@speedchoice.com>],
who wrote in article <B6B087CE7A374B15.60A84CC55288E5DD.32297D1850D47EFF@library-proxy.airnews.net>:

> I understand what you're saying, (and the problem here is
> that browsers word-wrapping really prevents VERBATIM
       ^^^^^^^^
> posting), so what I'll do is repost the exact data,

Browsers?!  What are you taking about?!

> DATASET2
> ------------
> \n
> A request has been made to provision modem 99999, a CCM201\n
> modem, with 10 usable IP addresses for Cablemaster ID
> PCTV.\n
> REQUESTOR: derek\n
> RESPONSIBLE: foobar\n
> \n
> Downstream:     PHOENIX SIF2QAM1\n
> Upstream Modem: 602-264-1854\n
> Call Waiting? : NO\n
> Customer Name : Test USer\n
> Address1:       77777 Do Not Create\n
> Address2:       Phoenix AZ 88888\n
> Address3:\n
> Phone Number:   550-555-5555\n
> \n
> ------------
> 
> The exact section of code that is being executed is:
> ----------------------------------------------------
>  $cmid = $1 if $request =~ /(\d{6}\-\d{2})\./g;
>  $cmid = 'PCTV' if $request =~ /(pctv)/ig;
>            # If pctv is found in the body at all,
>            # then its an internal request, so ignore
>            # any Cablemaster ID we may have found

Hit:  Where is 

    pos $request

now?

>  $uuid = $1 if $request =~ /modem (\d{5,6})/g; 

What this /g is doing there?

Works as documented.

Ilya


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

Date: Wed, 6 May 1998 20:39:21 +0100
From: Andy Armstrong <andy@wonderworks.co.uk>
Subject: Re: Bad free() ignored -- latest Perl not an option
Message-Id: <CfbDeAApxLU1EwdS@wndrwrks.demon.co.uk>

Hmm. Follow myself up twice... Why not?

In article <dgea8DAjBJU1Ew9s@wndrwrks.demon.co.uk>, Andy Armstrong
<andy@wonderworks.co.uk> writes
>In article <FBbMkGA1YIU1EwMi@wndrwrks.demon.co.uk>, Andy Armstrong
><andy@wonderworks.co.uk> writes
>
>[snip]
>
>>Ditching NDBM altogether and storing the databases in text files is an
>>option (they're not huge), but not a terribly attractive one...
>
>Actually I've just tried removing the NDBM dependency and it still
>produces the same error so NDBM evidently has nothing to do with it.
>
>The message is always associated with a line like
>
>  sub xxx
>  {
>     my ($smig, $smeg) = @_;     <-- error reported here
>  }

I was trying to disable this warning by putting

   $ENV{'PERL_BADFREE'} = 1;

somewhere early in the script as per perldiag. However, having looked at
the perl source I have it seems that perldiag has this wrong and
PERL_BADFREE should in fact be set to zero to disable the warning.
Unfortunately I can't confirm this as neither setting works for me.

-- 
** Don't CC any follow-ups to me - I *do* read the newsgroups I post to **
Andy Armstrong, Wonderworks, http://www.wonderworks.co.uk


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

Date: 6 May 1998 18:28:19 GMT
From: jimmey@lexis-nexis.com (Jimmey Todd)
Subject: Converting Perl to C
Message-Id: <6iqa43$37r@mailgate.lexis-nexis.com>

Has anyone written a program which will convert Perl to C? Unfortunately,
not everyone has/wants Perl... 

And, yes, I have read the FAQ....

Any help or information is appreciated. Thanks!


--
Jimmey W. Todd             | "Row well and live!"
jimmey@lexis-nexis.com     |           -- Quintus Arius, from Ben Hur


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

Date: 6 May 1998 19:50:49 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Converting Perl to C
Message-Id: <6iqeup$seo$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    jimmey@lexis-nexis.com (Jimmey Todd) writes:
:Has anyone written a program which will convert Perl to C? 

No.

:Unfortunately,
:not everyone has/wants Perl... 

Then they don't deserve it.  Period. 

:And, yes, I have read the FAQ....

Then I don't feel bad about prevaricating.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

With a PC, I always felt limited by the software available.  On Unix, I am
limited by my knowledge.  --Peter J. Schoenster <pschon@baste.magibox.net>


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

Date: 6 May 1998 16:23:08 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6iq2pc$nhe2@eccws1.dearborn.ford.com>

In article <pudge-0405981615350001@ppp-47.ts-1.kin.idt.net>,
	pudge@pobox.com (Chris Nandor) writes:
>In article <6il4pl$no33@eccws1.dearborn.ford.com>,
>cpierce1@cp500.fsic.ford.com (Clinton Pierce) wrote:
>
># Not if you're behind _very_ thick firewalls, as at Ford Motor Co.
>
>That is your company's fault for breaking something you need access to. 
>CPAN.pm just uses standard FTP or HTTP ports.  If you can't FTP or HTTP,
>then why are you complaining about CPAN anyway?
>

*sigh* The Real World has firewalls.  I _can_ ftp, just through a 
bastion host.  I can HTTP, just from a proxy.  No DNS lookups inside of
Ford for outside addresses--that's what the firewall hosts are for.
But that's not the important point, <flame>you're missing it entirely</flame>.

If you can't/won't use the CPAN.pm interface to CPAN, then CPAN is lame.
It's got some nice resources, but without CPAN.pm, it's exceedingly 
frustrating.

-- 
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |
|  cpierce1@ford.com    |     you get rotten miracles"    | dcicorp.com/ |
| fubar@ameritech.net   |--Miracle Max, The Princess Bride| ~clintp      |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



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

Date: Wed, 06 May 1998 18:54:49 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <pudge-0605981452580001@192.168.0.3>

In article <6iq2pc$nhe2@eccws1.dearborn.ford.com>,
cpierce1@cp500.fsic.ford.com (Clinton Pierce) wrote:

# *sigh* The Real World has firewalls.  I _can_ ftp, just through a 
# bastion host.  I can HTTP, just from a proxy.  No DNS lookups inside of
# Ford for outside addresses--that's what the firewall hosts are for.
# But that's not the important point, <flame>you're missing it entirely</flame>.

CPAN works fine with proxies.  And no, CPAN is not lame without CPAN.pm. 
I browse CPAN all the time with Netscape, and I love it.

Anyway, if you set your CPAN hosts as http hosts, and set your http_proxy,
then you should be just fine.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Wed, 06 May 1998 13:24:48 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Documentation Software for Perl
Message-Id: <35509CE0.B9D696AD@matrox.com>

steve wrote:

> Hi...
>
> Does anyone know of or use a product for Perl that will show a map of what
> functions call which functions?  It should draw out some sort of flow
> diagram of all the perl modules called.  And... if it could work w/html
> files, showing which html files call which perl modules then showing all
> the function links.
>
> Thanx much for any advice
> scp@datatel.com
> -Steve

 I don't think I ever ran into such a "product" for Perl, or for any other
language for that matter. Anywayz, if such a thing does indeed exist, I
wonder how legible it would be!

--
Ala Qumsieh             | "How much wood would a woodchuck
ASIC Design Engineer    |  chuck if a woodchuck could
Matrox Graphics Inc.    |  chuck wood?"
Montreal, Quebec        |             - Trivial ... 5!





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

Date: 6 May 1998 18:43:45 GMT
From: Hugh_Dunne@nospam.com (Hugh Dunne)
Subject: Re: Embedded systems programming
Message-Id: <3550AF68@nospam.com>

cberry@cinenet.net (Craig Berry) wrote:
[Excellent nutshell description of embedded systems programming]

>To my knowledge, nobody has ever developed a 'real' embedded application 
>in Perl -- but I'd love to hear about one, if such exists!

According to the blurb in the camel book, "Perl is being used daily in every
imaginable field, from aerospace engineering to molecular biology... [etc.]".
This strikes me as bogus. I've done a lot of work on satellite-borne
embedded systems and I can tell you that perl is not going into space any
time in the forseeable future, nor is it going to be the language of choice
for number-crunching!

Let's face it, Swiss army knives are very useful but you are never going to
have a Swiss army knife which beats the best available tool in every given
situation. Similarly with computer languages - there is never going to be a
universal "panacea" language which beats the pants off every other language
in every application domain. Perl shines in situations where the data was
produced and/or will ultimately be consumed by humans - i.e. text based data -
and where either of the following apply:

* Speed of development is more important than speed of execution - i.e.
rapid prototyping or once-off programs.

* There is heavy user interaction and thus speed of execution is not critical
because the application spends most of its time waiting for a user input
anyway.

When execution speed and memory usage are critical, perl is always going to
be a poor choice compared to C, Ada etc. While I find perl very interesting,
a big turn-off for me is the "rah rah" attitude so prominent both in the
camel book and this ng, which seems to say that only a fool would *ever*
program in anything other than perl!

--
Hugh Dunne
-------->>>> TO EMAIL ME: replace "nospam" with "hotmail" <<<<--------


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

Date: 05 May 1998 10:34:35 -0700
From: Paolo Ciccone <p-ciccone@usa.net>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <wkpvhsbp04.fsf@usa.net>

>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:

[a lot of stuff deleted]

    TC> You are insane.  Please go fetch a document by URL, including
    TC> redirect handling, and then parse the HTML by yourself into a
    TC> tree structure that you can traverse for modification.  Go
    TC> ahead.  You're a programmer, after all.

Tom, isn't ironic how greedy and spoiled people are ? You write your
stuff for free, you documente it and post on the net. You prepare a
great Web site and support all kind of newbies repeating over and over
the same answers. But they still complain. Better laugh at this
otherwise you loose faith in the human race :)

I had so much work done because of the generosity of the Perl
community that I can't possibly immagine somebody complaining about
CPAN or the quality of the modules. I guess the original poster should
just go ahead and write Perl from scratch, he surely we'll learn
something (if he will survive the taks ;)) I know you're outraged, and
rightly so, but I believe the Perl community recognizes the real value
of all the modules and the effort put behind them.

For me, CPAN, Tk and dozens of other modules have been estremely
useful and I have an enourmous debt of gratitute for Larry, you and
all the people that spent so much time and energy in sustaining and
improving Perl with *quality code*. Don't be upset by few individuals
that don't know how to walk in this world.


--Paolo


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

Date: 6 May 1998 18:31:57 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqaat$1d2@fridge.shore.net>

Paolo Ciccone <p-ciccone@usa.net> wrote:
: CPAN or the quality of the modules. I guess the original poster should
: just go ahead and write Perl from scratch, he surely we'll learn
: something (if he will survive the taks ;)) I know you're outraged, and

I'm the original poster to this thread (not the one who said he didn't need LWP) and
I have no intention of re-writing Perl from scratch (or anything else). However, I
sure as hell won't spend an hour or two trying to learn how to use some module if I
can write the code to accomplish the task myself in ten minutes. That was my
original point.

--Art

National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
        Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html



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

Date: 6 May 1998 19:47:56 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqepc$o71$5@marina.cinenet.net>

Paolo Ciccone (p-ciccone@usa.net) wrote:
: I had so much work done because of the generosity of the Perl
: community that I can't possibly immagine somebody complaining about
: CPAN or the quality of the modules.

As one of those who has recently complained about the quality of CPAN, 
let me explain why.  Yes, CPAN is infinitely better than nothing at all, 
it represents immense amounts of volunteer labor by dedicated 
individuals, it solves a multitude of problems, and I personally have 
benefitted from it enormously.

However, I don't believe that makes CPAN off-limits for criticism.  The
problems with inadequate module doc, confusing dependencies, and poor
correspondence between searchable names and tar-file names mentioned by
myself and others are real and can be solved.  Doing so would make CPAN a
*better* resource. 

And, by the way, while CPAN.pm is great, it's not a cure-all.  I can't use
it (for example) on my old brain-dead DOS box, where I do a good deal of
Perl development.  I have spent far too much time trying to find (say)
HTML::Parser, get it into this box, and get it working.  It needn't be as
hard as it is. 

: I guess the original poster should
: just go ahead and write Perl from scratch, he surely we'll learn
: something (if he will survive the taks ;)) I know you're outraged, and
: rightly so, but I believe the Perl community recognizes the real value
: of all the modules and the effort put behind them.

Of course!  Doesn't stop us from kibbitzing, though. :)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Wed, 06 May 1998 14:17:00 -0600
From: baiju@bst.net
Subject: Re: GDBM in perl-5.004 ????
Message-Id: <6iqcvc$nar$1@nnrp1.dejanews.com>

In article <6ikpe6$k7t$1@newsserv.zdv.uni-tuebingen.de>#1/1,
  zxmve07@aix01.zdv.uni-tuebingen.de (Andreas Mueller) wrote:
>
> 	hello !!!
>
> why isn't GDBM included in perl 5.004 anymore ??? (its still included in
perl5.003.) and what shall  i use instead ???
>
> 	thanks,
> 		Andreas
>

If you are talking about perl for win32, GDBM doesnt come with either
distributions.(G.S and Activestate). But thanks to Dave roth You can obtain
the GDBM_File Module created by him. Visit www.roth.net for the appropriate
files.

                                     Baiju

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 06 May 1998 15:37:48 -0400
From: Steven Tolkin <steve.tolkin@fmr.com>
To: Andy Glew <glew@cs.wisc.edu>, steve.tolkin@fmr.com
Subject: Re: Help choosing names =~ Perl-SQL
Message-Id: <3550BC0B.D80F48BD@fmr.com>

CC also sent to glew@cs.wisc.edu
Andy Glew wrote:

> Recommendations solicited for names for a database written
> in Perl.  Current;y called 'Perl-SQL'

 ...

> It accepts a variety of ASCII text file database formats, ranging from
> SDRs - Singleline Delimited Records
>     e.g.          address,count
>                     1,3
>                     ...
> (SDRs are a superset of common database formats such
> as CSVs (comma separated variables) and TSVs (tab separated variables))
>
> to MNTs - Multiline Named Tuples
>     e.g.         {
>                         address => 1,
>                         count => 2,
>                     }

I agree you should support both of these formats,but think they should be redesigned to
use othogonal features.
I want to have individual values enclosed in quotation marks
(to allow any character to occur)
while still having a multiline format.
You might want to support two different types of enclosed values:
one where internal quotation marks are doubled, as in CSV, and one where they
are escaped with a backslash, as in Perl.
It is also reasonable to allow both formats within one record.
I would use your SDR format for all the null not allowed columns,
and the named format for the null allowed columns.
To save space I want multiple named values to appear on one line.
I also want to be able to have comments at the end of data lines.

> Yes: currently I just eval the MNT format as a Perl expression.

If you are parsing CSV you should be able to parse these too, ratherthan having perl parse
them

> Perl-SQL supports SQL aggregate functions, such as SUM, AVG, etc.
> It allows you to do things like
>        SELECT address, count/SUM(count) AS "%age" FROM "database.mnt"

This is very useful -- but do you allow the equivalent of the SQL group by?

> Perl-SQL currently only supports sorted equijoins.

This seems somewhat odd given how well perl handles hashes.Perhaps look at the Set module
for efficient ways to do set operations
using hashes.

> ag_perl_sql_parser.pm
>     a parser generated by byacc.
>     returns a parser object
>
> ag_perl_sql_lexer.pm
>     a handwritten lexer. returns a lexer object.

I guess ag_ stands for Andy Glew and unless you are going to use this prefixconsistently
remove it here.

> multiline_named_tuples.pm
> singleline_named_tuples.pm
> singleline_delimited_records.pm
>     methods for the various types of
>     databases implemented
>     by plain_text_database.pm

Either use tuples or records in all all places.  I prefer records,especially since you
support "variant" records.

> nice_IO.pm

I prefer consistent capitalization -- if IO were io all names would be all lowercase.

> misc.pm

Maybe name this perl_sql_misc.pm for clarity.


Hopefully helpfully yours,
Steve
--
Steven Tolkin          steve.tolkin@fmr.com      617-563-0516
Fidelity Investments   82 Devonshire St. R27C    Boston MA 02109
There is nothing so practical as a good theory.  Comments are by me,
not Fidelity Investments, its subsidiaries or affiliates.




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

Date: Wed, 06 May 1998 14:34:40 -0400
From: Kevin Miles <kmiles@erols.com>
Subject: Re: help needed with regular expression
Message-Id: <3550AD40.76D35290@erols.com>

> The problem is perl does greedy matching:

>                         $line =~ s/<a href="(.*)">/<a
> href="\/cgi-bin\/clickcount\/log.cgi.............

Turn greedy matching off with a question mark

:  s/<a href="(.*)?">/<a ..........

>

>
>



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

Date: Wed, 06 May 1998 15:59:24 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: help needed with regular expression
Message-Id: <comdog-ya02408000R0605981559240001@news.panix.com>
Keywords: from just another new york perl hacker

In article <3550AD40.76D35290@erols.com>, kmiles@erols.com posted:

>Turn greedy matching off with a question mark
>
>:  s/<a href="(.*)?">/<a ..........

i think that you meant  

   s/<a href="(.*?)">/<a ..........  

the other way is quite different. :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: Wed, 06 May 1998 14:18:28 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: how do you do to extract the title of a .html document?
Message-Id: <comdog-ya02408000R0605981418280001@news.panix.com>
Keywords: from just another new york perl hacker

In article <3550901b.140891260@enews.newsguy.com>, holcojh5@REMOVEMEwfu.edu (Philosopher King) posted:

>On Wed, 6 May 1998 17:56:26 +0200, "sg" <info@atig.fr> wrote:

>>I would wanted to know how to extract the title of a .html

>Just use a simple regular expression like
>
>if (/<title>(.*)<\/title>/i) {
>    print $1;
>    # or whatever else you want to do with it
>}

that wouldn't work on some of my stuff, for all the reasons that 
seem to be discussed every two weeks in this group.  in this
case, notice the greedy match.  so...

NAME
     HTML::HeadParser - Parse <HEAD> section of a HTML document

SYNOPSIS
      require HTML::HeadParser;
      $p = HTML::HeadParser->new;
      $p->parse($text) and  print "not finished";

      $p->header('Title')          # to access <title>....</title>

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
doesn't have a regex fetish


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

Date: Wed, 06 May 1998 14:30:32 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: how do you do to extract the title of a .html document?
Message-Id: <comdog-ya02408000R0605981430320001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6iq5pf$o71$2@marina.cinenet.net>, cberry@cinenet.net (Craig Berry) posted:

>sg (info@atig.fr) wrote:
>: I would wanted to know how to extract the title of a .html

>Well, if you want to, you can get and use the HTML::Parser module, which 
>makes this relatively easy.

it's even easier than that...

>If you want to do it 'by hand', my version would look like this:

>  ($title) = $text =~ m!<\s*title\s*>(.*?)<\s*/title\s*>!s;

hmmm..., some of those \s* look suspicious!  

avoid such errors with the nifty HTML::HeadParser module. :)

NAME
     HTML::HeadParser - Parse <HEAD> section of a HTML document

SYNOPSIS
      require HTML::HeadParser;
      $p = HTML::HeadParser->new;
      $p->parse($text) and  print "not finished";

      $p->header('Title')          # to access <title>....</title>

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
still doesn't have a regex fetish.


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

Date: Wed, 06 May 1998 15:57:39 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: mirroring sites with a perl script
Message-Id: <comdog-ya02408000R0605981557390001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6iq7qr$flh$1@nnrp1.dejanews.com>, simon@scoutnet.org.uk posted:

>I have somewhere a perl script that automates mirring web sites but I can't
>find it again. Does anyone know where I can get one?

see the LWP module.  the documentation has an example for this.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
LWP - Library of Web Panaceae


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

Date: Wed, 06 May 1998 13:15:07 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Need simple way to define numerical output accuracy?
Message-Id: <35509A9B.DC68FB2D@matrox.com>

Mike wrote:

> Topic:
>       Need simple way to define numerical output accuracy? (1 of 1),
> From:
>       Adam Stubbs (astubbs@advantagecommunication.com)
>
> I am using a CGI script to calculate product pricing. When using
> standard variables $quantity, $unit_price, and $total the output
> removes the trailing 0's.
>
> e.g.
> via user input $quantity="4"
> via db $unit_price="27.95"
> therefore $total="111.8" (not 111.80)
>
> I have been able to ascertain this happens since $quantity is "4" and
> not "4.00". Unfortunately, this is via user input and the conversion
> code would seem extensive and unnecessary. Is there a simple way to
> define numerical output accuracy?
>
> Adam Stubbs
> astubbs@advantagecommunication.com

 try something like:
$total = sprintf "%4.2d", $quantity + $unit_price;

Enjoy,

--
Ala Qumsieh             | "How much wood would a woodchuck
ASIC Design Engineer    |  chuck if a woodchuck could
Matrox Graphics Inc.    |  chuck wood?"
Montreal, Quebec        |             - Trivial ... 5!





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

Date: Wed, 06 May 1998 13:26:55 -0600
From: baiju@bst.net
Subject: Re: problem reading DB_File on win32 platform
Message-Id: <6iqa1e$itr$1@nnrp1.dejanews.com>

In article <354e191f.36047814@news.ala.net>#1/1,
  jtaylor@ala.net (Jason Taylor) wrote:
>
> I'm not a 100% sure on this, but Unix starts newlines with the newline
> (/n) character and NT uses the linefeed-carriage return pair. This may
> be the source of your problem.
>
> On 1 May 1998 19:10:13 GMT, whc@mink.att.com (Wing Choy) wrote:
>
> >I have installed the DB_File extension on Windows NT.
> >I am not having any success trying to read a DB_File
> >created on Unix on the Windows NT machine.
> >
> >I failed right in the beginning trying to tie to the
> >DB_File.  If the DB_File is created in the NT, it
> >seems it can read or write with no problem.
> >
> >Have anyone run into such problem?  Was there some
> >special handling which need to be done in order to
> >read the DB_File created in Unix?
> >
> >Thanks for any pointer.
> >
> >	Wing
> >
>
You can not use DB files created in UNIX for NT machines.  DB files have to
be created in NT. I had a similar problem using GDBM_File module for win32
system.  DB files are not portable across platforms, they might even give you
trouble with different OS. Your best bet is to create the DB files in NT.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 06 May 1998 15:21:40 -0400
From: Joe Marzot <gmarzot@baynetworks.com>
Subject: Re: problem reading DB_File on win32 platform
Message-Id: <pdg1inyzln.fsf@baynetworks.com>

baiju@bst.net writes:

> 
> In article <354e191f.36047814@news.ala.net>#1/1,
>   jtaylor@ala.net (Jason Taylor) wrote:
> >
> > I'm not a 100% sure on this, but Unix starts newlines with the newline
> > (/n) character and NT uses the linefeed-carriage return pair. This may
> > be the source of your problem.
> >
> > On 1 May 1998 19:10:13 GMT, whc@mink.att.com (Wing Choy) wrote:
> >
> > >I have installed the DB_File extension on Windows NT.
> > >I am not having any success trying to read a DB_File
> > >created on Unix on the Windows NT machine.
> > >
> > >I failed right in the beginning trying to tie to the
> > >DB_File.  If the DB_File is created in the NT, it
> > >seems it can read or write with no problem.
> > >
> > >Have anyone run into such problem?  Was there some
> > >special handling which need to be done in order to
> > >read the DB_File created in Unix?
> > >
> > >Thanks for any pointer.
> > >
> > >	Wing
> > >
> >
> You can not use DB files created in UNIX for NT machines.  DB files have to
> be created in NT. I had a similar problem using GDBM_File module for win32
> system.  DB files are not portable across platforms, they might even give you
> trouble with different OS. Your best bet is to create the DB files in
> NT.

you are mistaken in the case of bsd-db - It is true that these other
databases are not arch. independent (gdbm, ndbm, etc.) but the beauty of
DB_File which is designed to work with bsd db-1.8x or 2.x (written(?)
and maintained by Kieth Bostic at http://www.sleepycat.com) is that not
only is this database fast, unrestrictive about key and data size and
content but also *arch. independent*.

check it out, GSM

> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/   Now offering spam-free web-based newsreading

-- 
 G.S. Marzot                        email: gmarzot@baynetworks.com
 Bay Networks Inc.                  voice: (978)670-8888 x63990
 600 Tech Park  M/S BL60-101        pager: (800)409-6080 (4096080@skytel.com)
 Billerica, MA  01821                 fax: (978)670-8145


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

Date: 6 May 1998 14:56:27 -0500
From: mikeh@minivend.com (Mike Heins)
Subject: Re: Query: Replicating a Vi command
Message-Id: <3550b25b.0@news.one.net>

davidi-at-msn-dot-com@think.about.it.com wrote:

> Specifically I'm trying to find all lines with a dollar sign and replace 
> all commas with an empty string.  I don't want to replace commas in lines 
> that have no dollar sign.  And I want all other lines in the file to be 
> sent to the output unmodified.

> In Vi/SED you'd do this with the statement

> 	g/\$/s/,//g

> It ought to be possible to do it with one line with Perl too.  How?

  perl -pi.bak -e '/\$/ and tr/,//d;' yourfile

If you want to line it up with other transforms in a script:

#!/usr/bin/perl -pi.bak

	
	/\$/ and tr/,//d;
	s/xx/yy/g;
	s/zz/aa/g;
	# etc.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
There ain't nothin' in this world   131 Willow Lane, Floor 2  | ||  _ \
that's worth being a snot over.     Oxford, OH  45056         | || |_) |
--Larry Wall                        <mikeh@minivend.com>     |___|  _ <
                                    513.523.7621 FAX 7501        |_| \_\


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

Date: Wed, 6 May 1998 13:03:57 -0400
From: Thaddeus Wakefield Batt <thaddeus@goofy.activework.com>
Subject: running perl as a service?
Message-Id: <Pine.LNX.3.96.980506125025.5318A-100000@goofy.activework.com>

I'm looking to get pointed in the right direction towards speeding up some
cgis.  I'm wondering if anyone out there has tried compiling a perl
interpreter into Apache so that perl-based cgis do not have to waste time
launching a perl process.

Or, alternately, can perl (or a perl script) be run as a service under
linux?

Or is this the wrong route to persue, and should I just port my
perl-based cgis to C code?

Thanks.


[^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^]
[  thaddeus wakefield batt               ]
[  tbatt@siebel.com                      ]
[  thaddeus@shore.net                    ]
[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]




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

Date: 06 May 1998 14:20:01 -0400
From: Frank Sweetser <rasmusin@WPI.EDU>
Subject: Re: running perl as a service?
Message-Id: <87g1in45ym.fsf@paramount.res.wpi.net>

Thaddeus Wakefield Batt <thaddeus@goofy.activework.com> writes:

> I'm looking to get pointed in the right direction towards speeding up some
> cgis.  I'm wondering if anyone out there has tried compiling a perl
> interpreter into Apache so that perl-based cgis do not have to waste time
> launching a perl process.

an excellent idea - already done :)  look for the perl-mod extension to
apache, which does exactly this.  note that there's a few extra
restrictions on the perl scripts (namespace stuff, etc) but it should all
be documented.

-- 
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net | PGP key available
paramount.res.wpi.net RH 5.0 kernel 2.0.33/2.1.99   i586 | at public servers
``What is the sound of Perl?  Is it not the sound of a wall that people 
have stopped banging their heads against?''  -- Larry Wall


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

Date: Wed, 06 May 1998 11:37:50 -0700
From: Ron Klatchko <ron@ckm.ucsf.edu>
To: Thaddeus Wakefield Batt <thaddeus@goofy.activework.com>
Subject: Re: running perl as a service?
Message-Id: <3550ADFE.7498@ckm.ucsf.edu>

Thaddeus Wakefield Batt wrote:
> I'm looking to get pointed in the right direction towards speeding up some
> cgis.  I'm wondering if anyone out there has tried compiling a perl
> interpreter into Apache so that perl-based cgis do not have to waste time
> launching a perl process.

There are a couple of options you can look into.

The Apache/Perl integration project builds a Perl interpreter into
Apache.  It can be used for writing CGIs without the fork/exec overhead
or for writing Apache modules in Perl and more.  See
http://perl.apache.org/

FastCGI turns CGI into long running processes.  The CGI is still
language independent and a seperate process from the web server.  See
http://www.fastcgi.com/

moo
----------------------------------------------------------------------
              Ron Klatchko - Senior Software Engineer
         UCSF Library and Center for Knowledge Management
                      ron@ckm.ucsf.edu


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

Date: 6 May 1998 15:08:12 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: running perl as a service?
Message-Id: <6iqces$rs0$1@monet.op.net>
Keywords: cloth collude extralegal inaction


In article <Pine.LNX.3.96.980506125025.5318A-100000@goofy.activework.com>,
Thaddeus Wakefield Batt  <thaddeus@goofy.activework.com> wrote:
>I'm looking to get pointed in the right direction towards speeding up some
>cgis.  I'm wondering if anyone out there has tried compiling a perl
>interpreter into Apache so that perl-based cgis do not have to waste time
>launching a perl process.

It's been done.  It's great.  It's mod_perl.

See http://perl.apache.org.

>Or is this the wrong route to persue, and should I just port my
>perl-based cgis to C code?

Blech.


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

Date: Wed, 6 May 1998 11:10:57 -0700
From: "matthew d. p. k. lanier" <lanier@shell6.ba.best.com>
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: SF.pm perl user's group!
Message-Id: <Pine.BSF.3.96.980506110848.27679A-100000@shell6.ba.best.com>

randal-

thanks for the question, it's an important one.

this group is, of course, open to anyone crazy enough to come, but is
centered in san francisco.  silly valley people are welcome, but i'm not
sure how many will want to come up sf to hang with a bunch of geeks when
there's enough down there.

so, i repeat, if you're a san francisco or north bay perl hacker, let me
know.  this group is just forming, and i'd love to get your input on what
you'd like to get from a local perl user's group.
 
> > It's not clear whether you expect the Perl users of Silicon Valley to
> consider themselves part of your group or not, because you mention SF
> by name, and the "bay area" is pretty big.  I know that every time *I*
> go to Silly Valley, *I* end up partying every night with a bunch of
> crazed Perl hackers.  So the informal groupings have already taken
> shape.

thanks-

matt lanier
matt@lanier.org
matt@saturn5.com




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

Date: 6 May 1998 19:49:12 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Using executable pathname to define include path
Message-Id: <6iqero$seo$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Art Cohen <upsetter@shore.net> writes:
:But there is a serious question here: Is it *possible* to design an
:automation system for posting the Perl FAQ to the web?

Trivially.  That's not the point.  I will not update the 
documentation piecemeal.  It's all or nothing.  Right now,
it's nothing.  

I see no reason not to remove it from CPAN, since it is 
inaccurate and misleading.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    X-Windows: A terminal disease.
	--Jamie Zawinski


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

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 2518
**************************************

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