[10539] in Perl-Users-Digest
Perl-Users Digest, Issue: 4131 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 2 15:07:56 1998
Date: Mon, 2 Nov 98 12:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 2 Nov 1998 Volume: 8 Number: 4131
Today's topics:
-Computer Bestsellers List - Nov. 2, 1998 suggest@10bestsellers.com
Re: Comparative modularization (was: Not to start a lan <dbane@shannon.tellabs.com>
Re: Comparative modularization (was: Not to start a lan (Larry Rosler)
Deleting .htaccess <support@counter.w-dt.com>
Re: Example of subclassing in Perl ?? (Jon Drukman)
Re: general questions about perl from newbie <dan@ferrarinet.reno.nv.us>
Re: How does one sort associative array numerically? <d-edwards@nospam.uchicago.edu>
Re: Interesting challenge: Reformatting text to 80 cha (John Stanley)
Re: Interesting challenge: Reformatting text to 80 cha (Larry Rosler)
lingering close - can't find answers... <kady@earthlink.net>
Re: lingering close - can't find answers... (Thad Humphries)
Re: Netscape equivalent of ASP <sam.berman@att.com>
Re: New posters to comp.lang.perl.misc <dan@ferrarinet.reno.nv.us>
Re: parsing email address problem <r28629@email.sps.mot.com>
Parsing problem <cmeilahn@nauiww.org>
Re: Parsing problem <zenin@bawdycaste.org>
Re: Passing $Variables from script to script (Larry Rosler)
Perl and PGP <hannum@ohio.edu>
Perl Win32::ODBC and Oracle BLOBs? (Anita M Wilcox)
Re: perl&cgi question droby@copyright.com
Re: Problem with Mysql (Matt Knecht)
Q:Running a perl executable w/o perl installed dtropea@ctron.com
Question regarding CGI.pm <gbc1@axe.humboldt.edu>
Reference Safety <jeromeo@atrieva.com>
Shell built-in commands in a perl script? <steveg_nospam@gcg.com>
Re: unknown problem with writing user input to a file! (Brand Hilton)
Re: unknown problem with writing user input to a file! <sernc@mailserv.rz.fh-muenchen.de>
Re: VARIABLES DE ENTORNO CGI <r28629@email.sps.mot.com>
Version control for Perl Modules mlehmann@prismnet.com
Re: Writing to MS-Access database problems <gibbensr@pilot.msu.edu>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 02 Nov 1998 19:29:44 GMT
From: suggest@10bestsellers.com
Subject: -Computer Bestsellers List - Nov. 2, 1998
Message-Id: <364305ea.1237046@nntp.netcom.ca>
Top 10 Books: Computer Books Bestsellers List
November 2, 1998
----------------------------------------------------------------------
[*Note: Best Viewed in Courier Font*]
COMPUTER PROGRAMMING BOOKS
1) Core Java 1.1: Fundamentals Cay S. Horstmann
2) Learning Perl, 2nd ed. Randal L. Schwartz
3) The Perl Cookbook Tom Christiansen
4) Javascript Bible, 3rd ed. Danny Goodman
5) Programming Perl, 2nd ed. Larry Wall
6) Javascript: The Definitive Guide David Flanagan
7) Uml Distilled Martin Fowler
8) Unix in a Nutshell Daniel Gilly
9) Java in a Nutshell David Flanagan
10) Instant Ado 2.0 Programmer's Alex Homer
COMPUTER DATABASE BOOKS
1) Access 97 Developer's Handbook Paul Litwin
2) Microsoft Access 97 Step by Step Catapult Inc.
3) The Practical SQL Handbook Judith S. Bowman
4) Cold Fusion Web Application Ben Forta (Editor)
Construction Kit
5) Oracle 8: The Complete Reference George Koch
6) Crystal Reports for Dummies Douglas J. Wolf
7) Oracle Dba Handbook Kevin Loney
8) Inside Microsoft SQL Server 6.5 Ron Soukup
9) Oracle PL/SQL Programming Steven Feurstein
10) Access 97 Bible Cary N. Prague
This list is produced by Top 10 Books Inc. To see Best Selling
Books in other popular categories visit their Home Page at:
http://www.10bestsellers.com/index2.html
-----------------------------------------------------------------------
Related Topics: Biography Books, Computer Books (Database &
Programming), Health Books, Diet Books, Fitness Books,
Sci-Fi Books, Fantasy Books, Stock & Investment Books,
New York Times Bestsellers List, Publishers Weekly Bestselling
Books
------------------------------
Date: Mon, 02 Nov 1998 18:26:11 +0000
From: Darren Bane <dbane@shannon.tellabs.com>
Subject: Re: Comparative modularization (was: Not to start a language war but..)
Message-Id: <363DF943.AF3F1A2C@shannon.tellabs.com>
Darrin Edwards wrote:
[snipped]
The rules aren't that difficult.
> "What an impertinent thing to say!" exclaimed Aunt Selma.
Adjective. It refers to thing (a noun).
> Turning to Marge, Aunt Patty intoned coldly, "That child of yours
> always speaks so impertinently."
Adverb. How the child speaks. Refers to speaks (a verb). Actually, I
was taught in school that adverbs always end in ly, and haven't seen a
counterexample yet.
> Barely containing her rage, Marge snapped, "Go at once to your room,
> you impertinent child!"
Adjective. Refers to the child (a noun).
> In the silence that followed, Homer was heard to mutter, "Mmmm... context-
> dependent semantics..."
Context-dependent, yes. But logical.
> Darrin
--
Darren Bane
#include <stddisclaimer.h>
------------------------------
Date: Mon, 2 Nov 1998 11:03:57 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Comparative modularization (was: Not to start a language war but..)
Message-Id: <MPG.10a7a1fb46bbb4b8989854@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <363DF943.AF3F1A2C@shannon.tellabs.com> on Mon, 02 Nov 1998
18:26:11 +0000, Darren Bane <dbane@shannon.tellabs.com> says...
...
> Adverb. How the child speaks. Refers to speaks (a verb). Actually, I
> was taught in school that adverbs always end in ly, and haven't seen a
> counterexample yet.
You were taught nonsense (or misunderstood what you were taught). There
are so many counterexamples that it's not worth enumerating them. But
let's start with *your* sentence. What part of speech do you think
"always" is?
Never say "always" (or "never", of course).
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 02 Nov 1998 13:42:07 -0600
From: Mike <support@counter.w-dt.com>
Subject: Deleting .htaccess
Message-Id: <363E0B0E.6C17123@counter.w-dt.com>
How would you make this code delete .htaccess files too?
$files = "";
$dir = "$basedir/$INPUT{'deletemember'}";
chdir($dir);
$member = `ls $files`;
@member = split(/\n/,$member);
foreach $members (@member) {
unlink ("$basedir/$INPUT{'deletemember'}/$members");
}
I think it is because the ls command doesn't add .htaccess to the array
but I'm not sure if that is whats wrong how do you make it so it will?
------------------------------
Date: 2 Nov 1998 18:03:36 GMT
From: jsd@hudsucker.gamespot.com (Jon Drukman)
Subject: Re: Example of subclassing in Perl ??
Message-Id: <slrn73rt7k.n46.jsd@hudsucker.gamespot.com>
In article <71itql$82n$1@csnews.cs.colorado.edu>, Tom Christiansen wrote:
>:I still can't find anyplace where there's a simple example of how to
>:subclass in Perl. Could someone kindly post an example?
>
>I guess that Chapter 5 the Camel and the perlobj, perltoot, and perlbot
>manages were to no avail? Sigh.
They are not sufficient for the uninitiated. I had the same problem
months ago when I was first attempting this. I also had to seek
recourse through the newsgroup (which was indeed helpful.) (See
http://x10.dejanews.com/getdoc.xp?AN=311128841 and its followups.)
I would suggest putting the word "subclass" somewhere prominently near
the top of perltoot/Inheritance. (maybe rename it to "Inheritance
(aka Subclassing)")
Also I might suggest moving discussion of @ISA nearer to the top of
the Overridden Methods page, or at least mention that it exists, it
does something, and more info is coming later on in this section...
The string "subclass" is not found anywhere on the perlobj page.
Perhaps it could be added somewhere.
Hope that was constructive,
--
Jon Drukman jsd@gamespot.com
-----------------------------------------------------------------------
Fear the government that fears your computer.
------------------------------
Date: Mon, 2 Nov 1998 10:42:23 -0800
From: "Dan O'Connor" <dan@ferrarinet.reno.nv.us>
Subject: Re: general questions about perl from newbie
Message-Id: <363dfd3d.0@news.greatbasin.net>
>At this point, I believe that
>there's insufficient overlap in our working vocabularies for
>me to provide you with much of an answer
Then why bother responding at all? If you can't be helpful, then clear the
bandwidth for those who can.
------------------------------
Date: Mon, 2 Nov 1998 18:03:36 GMT
From: Darrin Edwards <d-edwards@nospam.uchicago.edu>
Subject: Re: How does one sort associative array numerically?
Message-Id: <tgiugyc6pz.fsf@noise.bsd.uchicago.edu>
Nick Moraitakis <nick@perlfect.com> writes:
> --------------1255D182BC33B974D72A1F50
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hashes cannot be sorted, by their nature. If you want to diplay results by key or
> by value and sort the key or value order, then have a look at
> http://perlfect.com/articles/sorting.shtml
>
> (I hope people her don't consider this url-spamming... it is a brief sorting
> tutorial)
I might consider some of the contents of that page shameless copying
of perlfaq4 (without attribution) except:
1) you omit the "sort" keyword in your last 4 examples;
2) you spell "sort" as "dort" at one point (although admittedly not
in actual code).
HTH,
Darrin
------------------------------
Date: 2 Nov 1998 18:27:40 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Interesting challenge: Reformatting text to 80 chars.
Message-Id: <71ktis$qrv$1@news.NERO.NET>
In article <363D681C.80564F43@curtco.com>,
Trevor Hilaiel <trevorh@curtco.com> wrote:
>wanted to see if you folks had a more elegant solution.. (I've been staring at
>it too long to be of any use)
fmt
------------------------------
Date: Mon, 2 Nov 1998 11:47:11 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Interesting challenge: Reformatting text to 80 chars.
Message-Id: <MPG.10a7ac19325bde59989857@nntp.hpl.hp.com>
In article <71ktis$qrv$1@news.NERO.NET> on 2 Nov 1998 18:27:40 GMT, John
Stanley <stanley@skyking.OCE.ORST.EDU> says...
> In article <363D681C.80564F43@curtco.com>,
> Trevor Hilaiel <trevorh@curtco.com> wrote:
> >wanted to see if you folks had a more elegant solution.. (I've been staring at
> >it too long to be of any use)
>
> fmt
Nice if you have such a command. From CPAN, a Perl solution:
Text::Wrap - Line wrapping and paragraph reformatting. Part of the Text-
Tabs+Wrap bundle.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 02 Nov 1998 10:53:10 +0100
From: Karen Drensky <kady@earthlink.net>
Subject: lingering close - can't find answers...
Message-Id: <363D8105.4008@earthlink.net>
Hi,
I've been searching on the "lingering close lost connection to client"
error coz it pops up a lot in my error logs and is causing me major
hasses.
I get the error when someone running IE3 (and possibly some other
browsers) try to submit a form that was created on the fly back to the
script that built it.
The browser hangs and, occasionally, the hourglass goes away by itself,
but no reply from the server is sent.
The frustrating part is, I've tried it from IE3 here, and it works fine,
so I'm no closer to a solution.
I found this page useful in explaining the problem:
http://www.apache.org/docs/misc/fin_wait_2.html
but my ISP say they're running Stronghold and not Apache????
Has anyone found out exactly what the behaviour is that causes the
problem in the client? If so, what can I do to remove it?
If you're lucky enough (sic) to be running IE3 or Nav 2.0, could you
possibly try to go through the site and let me know what behaviour your
browser exhibits - it's a shop site, so I need to fix it asap!!!
In fact, I'd welcome input from all browser users if poss.
http://www.elliotts-outdoor.co.uk
Select a product, choose edit cart, then either click recalculate or
checkout.
Any suggestions greatfully welcomed.
please reply to clive@(remove this)bigfish.co.uk.
thanks
cLive ;-)
------------------------------
Date: Mon, 02 Nov 1998 13:24:28 -0500
From: thad@blueridge.com (Thad Humphries)
Subject: Re: lingering close - can't find answers...
Message-Id: <thad-0211981324280001@thad.mac.blueridge.com>
In article <363D8105.4008@earthlink.net>, kady@earthlink.net wrote:
> http://www.apache.org/docs/misc/fin_wait_2.html
>
> but my ISP say they're running Stronghold and not Apache????
Stronghold *is* Apache (version 1.2.6 I believe) just with an SSL module on it.
--------------------------------------------------------------------
Thad Humphries "'Open Systems' means no fences. And
Software Engineer (aka, Nerd) no fences means no use for Gates."
Phone: 540/675-3015, ext. 225 - Sun Microsystems
------------------------------
Date: Mon, 02 Nov 1998 13:56:13 -0500
From: sam berman <sam.berman@att.com>
Subject: Re: Netscape equivalent of ASP
Message-Id: <363E004C.5061FEAF@att.com>
ChiliSoft provides a product that allows Netscape servers to support
ASP. You may wish to look into it.
--
sam
Justin Harvey wrote:
> Forgive my ignorance, ASP?
>
> no-spam wrote:
> >
> > Is there an equivalent of ASP using PERL (or anything) on Netscape's
> > servers?
>
> --
> Justin B. Harvey @Home Network
> @Work Software Engineer 425 Broadway
> jbharvey@corp.home.net Redwood City, CA 94063
> Voice: (650) 569-5692 http://www.home.net
------------------------------
Date: Mon, 2 Nov 1998 10:50:05 -0800
From: "Dan O'Connor" <dan@ferrarinet.reno.nv.us>
Subject: Re: New posters to comp.lang.perl.misc
Message-Id: <363dff09.0@news.greatbasin.net>
You people here spend half your time telling people that their posts aren't
related to Perl.
Well, Mr. Bacon, high keeper of the CLPM statistics, your message contains
nothing about Perl in it either. My mother always told me, spam is as spam
does.
Greg Bacon <gbacon@cs.uah.edu> wrote in message 71kh32$35s$2@info.uah.edu...
>Following is a summary of articles from new posters spanning a 7 day
>period, beginning at 26 Oct 1998 14:53:19 GMT and ending at
>02 Nov 1998 11:04:37 GMT.
>
>Notes
>=====
>
> - A line in the body of a post is considered to be original if it
> does *not* match the regular expression /^\s{0,3}(?:>|:|\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" email address and name.
> - Original Content Rating (OCR) is the ratio of the original content
> volume to the total body volume.
> - Find the News-Scan distribution on the CPAN!
> <URL:http://www.perl.com/CPAN/modules/by-module/News/>
> - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
> - Copyright (c) 1998 Greg Bacon. All Rights Reserved.
> Verbatim copying and redistribution is permitted without royalty;
> alteration is not permitted. Redistribution and/or use for any
> commercial purpose is prohibited.
>
>Totals
>======
>
>Posters: 219 (44.9% of all posters)
>Articles: 351 (25.8% of all articles)
>Volume generated: 574.8 kb (23.7% of total volume)
> - headers: 245.4 kb (4,960 lines)
> - bodies: 323.0 kb (10,264 lines)
> - original: 246.8 kb (8,100 lines)
> - signatures: 6.1 kb (148 lines)
>
>Original Content Rating: 0.764
>
>Averages
>========
>
>Posts per poster: 1.6
> median: 1 post
> mode: 1 post - 161 posters
> s: 1.9 posts
>Message size: 1676.8 bytes
> - header: 715.8 bytes (14.1 lines)
> - body: 942.3 bytes (29.2 lines)
> - original: 720.0 bytes (23.1 lines)
> - signature: 17.7 bytes (0.4 lines)
>
>Top 10 Posters by Number of Posts
>=================================
>
> (kb) (kb) (kb) (kb)
>Posts Volume ( hdr/ body/ orig) Address
>----- -------------------------- -------
>
> 17 30.8 ( 15.5/ 14.8/ 10.0) Jason Orendorff <jorendorff@ixl.com>
> 16 30.9 ( 10.0/ 20.9/ 20.9) "IFN" <harris@gc.maricopa.edu>
> 8 11.3 ( 6.3/ 5.0/ 2.9) pub@alma.ch (M.)
> 7 11.4 ( 5.3/ 6.1/ 2.9) "Alistair Calder"
<webmaster@topproducer.com>
> 6 8.4 ( 4.7/ 3.7/ 1.6) Kelvin Price <kprice@cardinal.co.nz>
> 6 28.4 ( 4.7/ 23.7/ 16.6) dkirby@see.sig.for.addr (Dave Kirby)
> 5 6.2 ( 3.8/ 2.2/ 1.4) Chintan Adhyapak
<ChintanA@worldnetcorp.com>
> 5 15.5 ( 3.3/ 12.1/ 9.9) gregghill@my-dejanews.com
> 5 8.3 ( 3.5/ 3.7/ 2.2) Michael Shulman <shulman@caltech.edu>
> 4 7.5 ( 3.1/ 4.4/ 3.1) Nick Moraitakis <nick@perlfect.com>
>
>These posters accounted for 5.8% of all articles.
>
>Top 10 Posters by Volume
>========================
>
> (kb) (kb) (kb) (kb)
>Volume ( hdr/ body/ orig) Posts Address
>-------------------------- ----- -------
>
> 30.9 ( 10.0/ 20.9/ 20.9) 16 "IFN" <harris@gc.maricopa.edu>
> 30.8 ( 15.5/ 14.8/ 10.0) 17 Jason Orendorff <jorendorff@ixl.com>
> 28.4 ( 4.7/ 23.7/ 16.6) 6 dkirby@see.sig.for.addr (Dave Kirby)
> 15.5 ( 3.3/ 12.1/ 9.9) 5 gregghill@my-dejanews.com
> 13.3 ( 2.4/ 10.9/ 6.5) 3 wtanksle@cx930311-b.ocnsd1.sdca.home.com
(William Tanksley)
> 11.4 ( 5.3/ 6.1/ 2.9) 7 "Alistair Calder"
<webmaster@topproducer.com>
> 11.3 ( 6.3/ 5.0/ 2.9) 8 pub@alma.ch (M.)
> 9.7 ( 1.3/ 8.4/ 8.4) 2 gsechen2@my-dejanews.com
> 8.4 ( 4.7/ 3.7/ 1.6) 6 Kelvin Price <kprice@cardinal.co.nz>
> 8.3 ( 3.5/ 3.7/ 2.2) 5 Michael Shulman <shulman@caltech.edu>
>
>These posters accounted for 6.9% of the total volume.
>
>Top 10 Posters by OCR (minimum of three posts)
>==============================================
>
> (kb) (kb)
>OCR orig / body Posts Address
>----- -------------- ----- -------
>
>1.000 ( 0.5 / 0.5) 4 William <msl1997@yahoo.com>
>1.000 ( 20.9 / 20.9) 16 "IFN" <harris@gc.maricopa.edu>
>0.967 ( 0.3 / 0.3) 3 "Simon B." <webmaster@ouweb.com>
>0.928 ( 2.0 / 2.2) 3 rstewart@vmirror.com
>0.842 ( 0.8 / 0.9) 3 "Bowler, Michael (EXCHANGE:CRK:5T11)"
<mkbowler@americasm01.nt.com>
>0.817 ( 9.9 / 12.1) 5 gregghill@my-dejanews.com
>0.701 ( 3.1 / 4.4) 4 Nick Moraitakis <nick@perlfect.com>
>0.700 ( 16.6 / 23.7) 6 dkirby@see.sig.for.addr (Dave Kirby)
>0.673 ( 10.0 / 14.8) 17 Jason Orendorff <jorendorff@ixl.com>
>0.645 ( 0.8 / 1.2) 3 Greg Ewing <greg@cosc.canterbury.ac.nz>
>
>Bottom 10 Posters by OCR (minimum of three posts)
>=================================================
>
> (kb) (kb)
>OCR orig / body Posts Address
>----- -------------- ----- -------
>
>0.597 ( 6.5 / 10.9) 3 wtanksle@cx930311-b.ocnsd1.sdca.home.com
(William Tanksley)
>0.581 ( 2.9 / 5.0) 8 pub@alma.ch (M.)
>0.513 ( 0.5 / 1.0) 3 Lyn A Headley <laheadle@boguscs.uchicago.edu>
>0.505 ( 1.6 / 3.3) 3 grahams@wpds.com
>0.468 ( 2.9 / 6.1) 7 "Alistair Calder" <webmaster@topproducer.com>
>0.466 ( 1.1 / 2.4) 3 amw@world.std.com (Anita M Wilcox)
>0.434 ( 1.6 / 3.7) 6 Kelvin Price <kprice@cardinal.co.nz>
>0.414 ( 1.6 / 3.9) 3 briang@access5.digex.net (Brian G.)
>0.384 ( 1.3 / 3.4) 3 Arne Jamtgaard <arnej@fc.hp.com>
>0.330 ( 1.0 / 3.0) 3 wlfraed@ix.netcom.com (Dennis Lee Bieber)
>
>24 posters (10%) had at least three posts.
>
>
>Top 10 Crossposters
>===================
>
>Articles Address
>-------- -------
>
> 17 Jason Orendorff <jorendorff@ixl.com>
> 6 dkirby@see.sig.for.addr (Dave Kirby)
> 4 "Jhirley (Jay) Fonte" <JFonte@TNetC.Net>
> 4 Lyn A Headley <laheadle@boguscs.uchicago.edu>
> 3 Greg Ewing <greg@cosc.canterbury.ac.nz>
> 3 wtanksle@cx930311-b.ocnsd1.sdca.home.com (William Tanksley)
> 3 wlfraed@ix.netcom.com (Dennis Lee Bieber)
> 3 pj@sgi.com (Paul Jackson)
> 3 Darrin Edwards <d-edwards@uchicago.edu>
> 2 Michiel Verhoef <michiel.verhoef@wkap.nl>
------------------------------
Date: Mon, 02 Nov 1998 12:51:59 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: parsing email address problem
Message-Id: <363DFF4F.9C0C5792@email.sps.mot.com>
[posted and copy emailed]
Jonathan Stowe wrote:
> > #! /usr/local/bin/perl
>
> ^ You probably dont mean that space and you probably also want -w
It seems to work fine for me with as many whitespaces I put in. I tried
on both HP-UX 10.xx and Solaris 2.x
-tk
------------------------------
Date: Mon, 02 Nov 1998 13:44:14 -0500
From: Carl Meilahn <cmeilahn@nauiww.org>
Subject: Parsing problem
Message-Id: <363DFD7D.8C6014DA@nauiww.org>
please respond to email...
I am having problems with one of my subroutines (about 30 lines
out of about 1000)...
Background:
I'm working on scripts to manage a pipe( | ) delimited database,
based on the Solena Sol DB_Manager scripts. The database is for
Job and Resume listings for our website.
my forms are sending:
<textarea wrap=virtual ...>
which works fine, but if someone hits enter/return while in that
text area, my scripts turn that into a new line, which is then
turned into a new row for the database (incorrectly). I would
like to change this carriage return character into the html <P>.
Any suggestions?
Thanks in advance.
--Carl M.
webmaster@nauiww.org
------------------------------
Date: 02 Nov 1998 19:30:32 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Parsing problem
Message-Id: <910034982.810849@thrush.omix.com>
[posted & mailed]
Carl Meilahn <cmeilahn@nauiww.org> wrote:
>snip<
: which works fine, but if someone hits enter/return while in that
: text area, my scripts turn that into a new line, which is then
: turned into a new row for the database (incorrectly). I would
: like to change this carriage return character into the html <P>.
: Any suggestions?
Something like this maybe?
$form{text_area_field} =~ s/\n/<P>/gm;
eg, run s/\n/<P>/gm on the field before you add it to the database.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Mon, 2 Nov 1998 11:34:53 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Passing $Variables from script to script
Message-Id: <MPG.10a7a936e1ad8685989855@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <jWl%1.17$jk1.18551@198.235.216.4> on Mon, 02 Nov 1998
17:25:35 GMT, John Hardy <jhardy@cins.com> says...
...
> $file = 'VVarin'; # Name the file
> open(INFO, $file); # Open the file
Where is the test whether the 'open' succeeded???
> @lines = <INFO>; # Read it into an array
> close(INFO); # Close the file
> %linesin=@lines; # read the array into a hash (foreach below
> doesnt seem to work unless I do this)
This is wrong. It assigns alternate lines of input as keys and as
values in the hash. It serves no purpose, as you can use the array
directly in the 'foreach' statement (despite your comment above).
> foreach $key (sort keys(%linesin)) {
> ($value)=split /:/,$linesin{$key};
> $key=join('.',$TableName,$key); ##add the table name to the field name
>
> print "$key\t$value\n";
> }
foreach $line (@lines) {
print "$TableName.$line";
}
This prints each of your key:value pairs exactly as they are in the
input file (including their newlines), prepending "$TableName." to each.
Postgraduate course ('one-liner'):
open INFO, $file or die "Couldn't read $file. $!\n";
print map { ( $TableName, '.', $_ ) } <INFO>;
close INFO;
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 2 Nov 1998 16:14:35 GMT
From: "Dave Hannum" <hannum@ohio.edu>
Subject: Perl and PGP
Message-Id: <F1syAC.4Cu@boss.cs.ohiou.edu>
Hello folks,
I have a perl shopping cart that is designed to send the orders via email.
I need to encrypt the orders with the owners PGP key? How can I call this
from the sendmail routine in the script? I'm running Perl 5.004.4 on a
Linux box using Apache server. The sendmail is in the usual
/usr/lib/sendmail directory. They have PGP on the server and have told me
I can utilize it if I can make the script access it. Any clues?
Sincerely,
Dave Hannum
------------------------------
Date: Mon, 2 Nov 1998 18:38:51 GMT
From: amw@world.std.com (Anita M Wilcox)
Subject: Perl Win32::ODBC and Oracle BLOBs?
Message-Id: <F1t54s.JJu@world.std.com>
Hi all,
This may or may not be the place for this question (if not,
please direct me elsewhere). I'm working with Win32::ODBC,
connecting to an Oracle database. I can't seem to find any info
on how to access the Oracle stuff I need via ODBC. I know
what to do on the Oracle side, but I'm not sure about binding
the variables and such in Perl when dealing with BLOBs. I
would prefer to use DBD (and have used it before) but we are
stuck with ODBC here (management decision :-( ) Any clues
or pointers?
AW
------------------------------
Date: Mon, 02 Nov 1998 19:08:00 GMT
From: droby@copyright.com
Subject: Re: perl&cgi question
Message-Id: <71kvuf$bj6$1@nnrp1.dejanews.com>
In article <363DDAE2.A18140AE@corp.home.net>,
Justin Harvey <jbharvey@corp.home.net> wrote:
> You need to change the mime association for .pl extension inside your
> browsers so that it will use it as a CGI, and not try to download it.
>
Wrong.
This has nothing to do with Perl, and would be better discussed in a forum
that discusses CGI and server (NOT browser) configuration.
--
Don Roby
droby@copyright.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 02 Nov 1998 18:37:43 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Problem with Mysql
Message-Id: <XZm%1.47412$ZF.7889500@news3.voicenet.com>
Nico <info@edoc.co.za> wrote:
>Hi,
>
>I installed Mysql and Perl and all the modules needed (hopefully!)
>
>I wrote a script (see below). This works fine if I run it from the
>commandline (./selector)
>
>If however I run it from http://..../cgi-bin/selector.pl, it doesn't
>work.
[ snip ]
>use CGI;
># Print HTML header
>print "Content-type: text/html";
Well, this part is wrong. If you're going to use CGI, you might as well
make use of it. Try:
print $query->header;
>I get the following error message in httpd.error_log
>
>[Thu Oct 29 19:31:03 1998] [error] Can't locate auto/DBI/connect.al in
>@INC (@INC contains: /usr/lib/perl5/i586-linux/5.00404 /usr/lib/perl5
>/usr/lib/perl5/site_perl/i586-linux /usr/lib/perl5/site_perl . /usr/
>/usr/lib/perl) at /usr/local/httpd/cgi-bin/selector.pl line 15
But that doesn't explain this. connect() is the first method you call
from DBI. Unless there is some sort of mod_perl wierdness getting in
the way, the only thing I can think of is to check and make sure that
the user you run Apache as has the correct permissions to read the DBI
install.
>The file "connect.al" does not exist on my machine (I did a find . -name
>"connect.al")
Nor mine. I do however have a connect sub in
'/usr/local/lib/perl5/site_perl/DBI.pm'. You could start by checking
that file. Then, check it's permissions. If all that is ok, su to your
web account, and run the script through perl -d to see where it fails.
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: 2 Nov 1998 11:32:15 -0800
From: dtropea@ctron.com
Subject: Q:Running a perl executable w/o perl installed
Message-Id: <71l1bv$n6e@pdrn.zippo.com>
I have a perl executable that i am planning on giving to a friend. The problem
is this person does not have perl installed. Is there any way he can run
this perl executable without having perl installed?
The perl executable will be compiled on a UNIX box and my friend also
has a UNIX box in which he needs to run the executable.
------------------------------
Date: Mon, 02 Nov 1998 11:46:33 -0800
From: Greg Coit <gbc1@axe.humboldt.edu>
Subject: Question regarding CGI.pm
Message-Id: <363E0C19.D85C458E@axe.humboldt.edu>
I'm trying to debug a script I wrote (with the help of CGI.pm) which
generates a web page with a form. Up to know, Ive always been able to
pop in the following code to find out what params are being passed after
the submit button is pressed (per the CGI.pm man page):
$query=new CGI;
print "<H2>Current Values</H2> $query\n<P>";
but instead of a list of the parameters (which is the normal response),
i get this:
Current Values
CGI=HASH(0x140145c78)
I've tried this is several parts of the script now, with the same
response (except the numbers after HASH are different). The only
things that's changed is we upgraded from Perl 5.003_2 to Perl 5.005.
After we found the above code doesn't work, we upgraded CGI.pm from 2.3
to 2.43 (the newest version we could find). This hasn't fixed the
problem.
I've copied the script I'm debugging to one of our servers that's still
running Perl 5.003_2, and the piece of code above works jsut fine, so I
think the problem is coming from the fact that we're running Perl
5.005. Any ideas or workarounds? Any idea of anything else with CGI.pm
that breaks with Perl 5.005?
Greg Coit
gbc1@axe.humboldt.edu
------------------------------
Date: Mon, 02 Nov 1998 10:10:39 -0800
From: "Jerome O'Neil" <jeromeo@atrieva.com>
Subject: Reference Safety
Message-Id: <363DF59F.BEC2C46B@atrieva.com>
I have been working with large hashes, and am concerned about scoping
issues when passing their references arround. If one sub returns a hash
reference for use in another sub, at what point does the reference fall
out of scope? Or am I just being paranoid?
Example: What situation would cause the reference returned by
getahashref() to go away?
#/usr/local/bin/perl -w
use strict;
useahashref();
sub getahashref(){
my(%hash) = (
# This hash is really big!
);
return \%hash;
}
sub useahashref(){
my($ref) = getahashref();
foreach(keys($%ref)){
# Were doing some cool stuff here.
}
}
Thanks!
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Mon, 02 Nov 1998 13:35:48 -0600
From: Steve Goldstein <steveg_nospam@gcg.com>
Subject: Shell built-in commands in a perl script?
Message-Id: <363E0994.41C6@gcg.com>
I want to use the shell built-in "source" command in my perl script.
How do I do it?
If I use
system("source <filename>") or `source <filename>`
in my script, I get the error message:
Can't exec "source": No such file or directory...
------------------------------
Date: 2 Nov 1998 18:32:23 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: unknown problem with writing user input to a file!
Message-Id: <71ktrn$9qv14@mercury.adc.com>
In article <71kp7v$rld$1@sparcserver.lrz-muenchen.de>,
Matevz Sernc <sernc@mailserv.rz.fh-muenchen.de> wrote:
>Here is the script:
>
>#!/usr/local/bin/perl
>
>$filename = "/home/euhost/websearch/urls.txt";
>$ok = "/home/euhost/websearch/ok.html;
^
You forgot the closing quote |
--
_____
|/// | Brand Hilton bhilton@adc.com
| ADC| ADC Telecommunications, ATM Transport Division
|_____| Richardson, Texas
------------------------------
Date: Mon, 2 Nov 1998 20:54:02 +0100
From: "Matevz Sernc" <sernc@mailserv.rz.fh-muenchen.de>
Subject: Re: unknown problem with writing user input to a file!
Message-Id: <71l2me$hvu$1@sparcserver.lrz-muenchen.de>
got it!
its only because of one missing "
at line 2 there must be a change to:
$ok = "/home/euhost/websearch/ok.html";
thanks a lot to Martin!
Matevz Sernc wrote in message <71kp7v$rld$1@sparcserver.lrz-muenchen.de>...
>----------- error message after starting "perl -w saveurl.cgi" -----------
>In string, @pairs now must be written as \@pairs at saveurl.cgi line 4,
near
>"})
>;
>@pairs"
>Bareword found where operator expected at saveurl.cgi line 10, near "$value
>=~ s
>/%([a-fA-F0-9][a-fA-F0-9])/pack("C"
> (Missing operator before C?)
>syntax error at saveurl.cgi line 10, near "$value =~
>s/%([a-fA-F0-9][a-fA-F0-9])
>/pack("C"
>String found where operator expected at saveurl.cgi line 15, near
>"open(TXT,""
> (Might be a runaway multi-line "" string starting on line 10)
> (Missing semicolon on previous line?)
>Execution of saveurl.cgi aborted due to compilation errors.
>--------- end of error message ----------
>
>Here is the script:
>
>#!/usr/local/bin/perl
>
>$filename = "/home/euhost/websearch/urls.txt";
>$ok = "/home/euhost/websearch/ok.html;
>read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>@pairs = split(/&/, $buffer);
>foreach $pair (@pairs) {
> ($name, $value) = split(/=/, $pair);
> $value =~ tr/+/ /;
> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> $value =~ s/~!/ ~!/g;
> $FORM{$name} = $value;
>}
>
>open(TXT,">>$filename") || die("Can i write a file ? \n\n$!");
>print TXT $FORM{'name'} . " ";
>close(TXT);
>
>
------------------------------
Date: Mon, 02 Nov 1998 12:39:37 -0600
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: VARIABLES DE ENTORNO CGI
Message-Id: <363DFC69.5CFA690C@email.sps.mot.com>
Nicol=E1s Rodr=EDguez wrote:
> =
> Desde hace algun tiempo la variable de entorno REMOTE_HOST me
> devuelve una cadena vacia cuando deber=EDa devolver la direcci=F3n del
> proveedor del navegante. =BFPor qu=E9?
> =
> Otra pregunta, =BFComo conseguir la direcci=F3n del navegante a partir =
de
> la direcci=F3n IP?
> =
> Gracias
> nicolasr@arrakis.es
Is there a perl module out there that can help translate this post to
english, or chinese perhaps?
-tk ;)
------------------------------
Date: Mon, 02 Nov 1998 18:15:09 GMT
From: mlehmann@prismnet.com
Subject: Version control for Perl Modules
Message-Id: <71ksrd$7cf$1@nnrp1.dejanews.com>
I use IBM's CMVC (essentially a souped up DB2 enabled VCS using SCCS special
characters. I have been placing my raw .pl and .pm files into it and then
installing the code using CMVC's extraction commands.
This question has nothing to do with CMVC and everything to do with storing
Perl Modules in a source code control system.
What is a good technique for using a source code control system to manage
changes to the code, but to use the "make install" command to actually install
the code into the file system?
Is it best to just check the .pm files into the source code control system?
--
Give someone a Perl script and they can hack for a night, teach them Perl, and
they can hack for a life time.
Give a man a fish, and you will satisfy him for a meal. Give a man a pole,
and you won't see him for the rest of the weekend.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 02 Nov 1998 13:12:33 -0500
From: Robert Gibbens <gibbensr@pilot.msu.edu>
Subject: Re: Writing to MS-Access database problems
Message-Id: <363DF611.F0339A2E@pilot.msu.edu>
Thanks, that worked great, and solved the problem I've been wrestling
with for weeks.
Michael Harp wrote:
>
> Try this,
>
> $SqlStatement= "INSERT INTO PhoneCalls (UserName) VALUES ('Tony')";
> $db->Sql($SqlStatement);
>
> Mike Harp
>
> Rob G wrote in message <363DD9ED.D9647E0F@pilot.msu.edu>...
> >Hi. I was wondering in anyone has any ideas about this...I'm trying to
> >write to an MS-Access97 database, and having problems. I'm using Win95,
> >OmniHttpd, Perl 5.005, and the Win32::ODBC mod. I can easily read any
> >table in the database, and output the data to the client, but I can't
> >INSERT anything. My code is below, and as I said, I can read the
> >database, just not INSERT. It doesn't even print "It worked" unless I
> >get rid of the INSERT statement. I ran ActiveState's PerlDebugger, and
> >it came back with the message
> >'Bareword found where operator expected at line 18 near ") VALUES"
> >Missing oeprator before VALUES? Syntax error at line 18, near ")
> >VALUES"'
> >
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4131
**************************************