[9512] in Perl-Users-Digest
Perl-Users Digest, Issue: 3107 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 9 13:07:17 1998
Date: Thu, 9 Jul 98 10:01:33 -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 Thu, 9 Jul 1998 Volume: 8 Number: 3107
Today's topics:
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Order form script question (Larry Rosler)
Re: Password script rpearce@my-dejanews.com
Perl based Web-to-database system <jjunkin@datacrawler.com>
Re: Perl CGI and warnings [Was: Re: -w on production co (Josh Kortbein)
perl HTTP/1.0 501 Not Supported <michael.derfler@mch.sni.de>
Perl to DB2 interface question lithium@pcmagic.net
secure HTTPS connection module? <douglas@home.com>
Re: Serial Port problems... (Greg Ercolano)
Re: Simple (?) Perl maths question (Josh Kortbein)
Re: strict and filehandles and subroutines <tchrist@mox.perl.com>
Where is perldoc? (Scott Erickson)
Re: Where is perldoc? <quentin.fennessy@amd.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 9 Jul 1998 16:09:27 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <6o2pvn$3lh$1@info.uah.edu>
Following is a summary of articles from new posters spanning a 8 day
period, beginning at 29 Jun 1998 14:35:00 GMT and ending at
07 Jul 1998 06:46:42 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" e-mail 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: 300 (53.1% of all posters)
Articles: 421 (26.6% of all articles)
Volume generated: 698.1 kb (25.2% of total volume)
- headers: 278.5 kb (5,810 lines)
- bodies: 409.0 kb (12,547 lines)
- original: 305.2 kb (9,785 lines)
- signatures: 10.3 kb (227 lines)
Original Content Rating: 0.746
Averages
========
Posts per poster: 1.4
median: 1.0 post
mode: 1 post - 233 posters
s: 1.1 posts
Message size: 1698.0 bytes
- header: 677.4 bytes (13.8 lines)
- body: 994.7 bytes (29.8 lines)
- original: 742.3 bytes (23.2 lines)
- signature: 24.9 bytes (0.5 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
10 22.5 ( 6.8/ 15.7/ 12.2) joker@inlink.com (John Hocking)
7 14.7 ( 5.7/ 9.1/ 7.2) Toby Chamberlain <tjchamberlain@hotmail.com>
6 8.0 ( 4.1/ 3.5/ 2.5) Chris Wareham <chris.wareham@blackwell.co.uk>
5 9.6 ( 3.4/ 6.2/ 3.5) "Simon Fairey" <simonf@conduit.co.uk>
5 5.4 ( 2.9/ 2.5/ 2.4) "Howard Dierking" <howard@vortexweb.com>
4 7.7 ( 3.2/ 2.9/ 2.9) jkapllan@world.std.com (Jeffrey Kaplan)
4 4.9 ( 2.6/ 2.3/ 2.3) dominique.cretel@cfwb.be
4 7.4 ( 2.9/ 4.5/ 1.7) Eugene Sotirescu <eugene@verticalnet.com>
4 5.5 ( 2.6/ 2.9/ 0.8) Christoph Wernli <cw@dwc.ch>
4 6.8 ( 2.0/ 4.3/ 2.1) larrym@imsi.com (Larry Martell)
These posters accounted for 3.3% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
38.5 ( 2.4/ 36.1/ 29.2) 3 "Jason" <jbrackman@hotmail.com>
22.5 ( 6.8/ 15.7/ 12.2) 10 joker@inlink.com (John Hocking)
14.7 ( 5.7/ 9.1/ 7.2) 7 Toby Chamberlain <tjchamberlain@hotmail.com>
13.7 ( 0.8/ 12.9/ 5.4) 1 maik.hertha@volkswagen.de
10.1 ( 2.6/ 7.5/ 3.6) 3 Dennis Golden <dlgolden@ibm.net>
9.6 ( 3.4/ 6.2/ 3.5) 5 "Simon Fairey" <simonf@conduit.co.uk>
8.7 ( 1.7/ 7.0/ 6.6) 3 blair@gobi.gps.caltech.edu (Blair Zajac)
8.0 ( 4.1/ 3.5/ 2.5) 6 Chris Wareham <chris.wareham@blackwell.co.uk>
7.7 ( 2.2/ 5.5/ 2.9) 3 "Pap" <Pap22@erols.com>
7.7 ( 3.2/ 2.9/ 2.9) 4 jkapllan@world.std.com (Jeffrey Kaplan)
These posters accounted for 5.1% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 2.9 / 2.9) 4 jkapllan@world.std.com (Jeffrey Kaplan)
1.000 ( 0.9 / 0.9) 3 bday@mtv03install2.eng.sun.com
1.000 ( 1.2 / 1.2) 3 sprigen687@uswest.net
1.000 ( 2.9 / 2.9) 3 Ross Mullen <rmullen@mcmail.com>
1.000 ( 2.3 / 2.3) 4 dominique.cretel@cfwb.be
1.000 ( 0.8 / 0.8) 3 "Darren Sweeney" <darrensw@pacbell.net>
0.976 ( 1.6 / 1.6) 3 "Jerry" <jerry@fitzweb.com>
0.974 ( 1.8 / 1.8) 3 Ulf Wendel <ulf.wendel@kiel.netsruf.de>
0.971 ( 2.4 / 2.5) 5 "Howard Dierking" <howard@vortexweb.com>
0.947 ( 6.6 / 7.0) 3 blair@gobi.gps.caltech.edu (Blair Zajac)
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.709 ( 1.6 / 2.3) 3 "David T. Bath (NRE)" <david.bath@nre.vic.gov.au>
0.699 ( 2.5 / 3.5) 6 Chris Wareham <chris.wareham@blackwell.co.uk>
0.652 ( 1.4 / 2.2) 3 radenjava <radenjava@javaisland.com>
0.556 ( 3.5 / 6.2) 5 "Simon Fairey" <simonf@conduit.co.uk>
0.524 ( 2.9 / 5.5) 3 "Pap" <Pap22@erols.com>
0.494 ( 2.1 / 4.3) 4 larrym@imsi.com (Larry Martell)
0.485 ( 3.6 / 7.5) 3 Dennis Golden <dlgolden@ibm.net>
0.411 ( 0.5 / 1.1) 3 Jeremy <jeremy@exit109.com>
0.384 ( 1.7 / 4.5) 4 Eugene Sotirescu <eugene@verticalnet.com>
0.274 ( 0.8 / 2.9) 4 Christoph Wernli <cw@dwc.ch>
31 posters (10%) had at least three posts.
Top 10 Crossposters
===================
Articles Address
-------- -------
6 "Howard Dierking" <howard@vortexweb.com>
3 Helge Blischke <H.Blischke@srz-berlin.de>
2 wong2020@tm.net.my (Huang)
2 ac123@simpatico.ca
2 Shaikh Sarmad <sarmad@ice1.fas.harvard.edu>
2 s123@ptd.net
2 blair@gobi.gps.caltech.edu (Blair Zajac)
2 "Max Files" <max@idfw.com>
2 cpierce1@deleteme.ford.com (Clinton Pierce)
2 mnc@diana.law.yale.edu (Miguel Cruz)
------------------------------
Date: Thu, 9 Jul 1998 08:02:59 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Order form script question
Message-Id: <MPG.100e7b818b3109f7989727@nntp.hpl.hp.com>
In article <35a4cc11.39263716@nntp.idsonline.com> on Thu, 09 Jul 1998
14:05:01 GMT, root.noharvest.\@not_even\here.com (-)
<root.noharvest.\@not_even\here.com (-)> says...
...
> $new_sub_total = sprintf ("%.2f", $sub_total);
>
> Here's a quick rundown on the various sprintf codes:
>
> %s String
> %c Character
> %d number (decimal number)
> %ld long decimal
> %u unsigned decimal number
> %lu long unsigned number
> %x hexadecimal number
> %lx Long Hex number
> %o Octal number
> %lo Long Octal
> %f fixed point floating-point number
> %e exponential floating-point number
> %g compact floating-point number
A useful summary, for some. This list does not appear in older versions
of perlfunc, only a pointer to the C library documentation.
The '%l?' variations don't mean much for Perl, which doesn't distinguish
integer lengths.
There are two others that might be useful also:
%% percent sign
%X hexadecimal number with capitals for [A-F]
> "%2f" gives you {any number of whole numbers}.xx like 10.00 or 5.01 or
> 10000.40, etc. "%3f" would give you 10.000, and so on.
Typos (it is correct earlier): '%.2f' and '%.3f'
What you have specifies the minimum field width.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 09 Jul 1998 15:54:42 GMT
From: rpearce@my-dejanews.com
Subject: Re: Password script
Message-Id: <6o2p42$8k1$1@nnrp1.dejanews.com>
In article <35a18936.1650343@dub-news.tpgi.com.au>,
mail@moggy.com (Bee Pee) wrote:
>
> I'm lookin for a password script (free one preferrably) which will
> protect a bunch of directories (not necessarily in the same root dir).
>
Use .htaccess built in to unix.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 09 Jul 1998 15:57:33 GMT
From: "Joe Junkin" <jjunkin@datacrawler.com>
Subject: Perl based Web-to-database system
Message-Id: <NL5p1.162$oF1.4606104@news.rdc1.ct.home.com>
Hello all, I am the lead developer for a Perl-based Web Database
application.
I am posting this message to try and gain feedback and comments on our Data
Crawler web-to-database application (www.datacrawler.com).
I am interested in finding out from the Perl community if there is interest
for a configurable, web-to-database HTML GUI for Perl.
The key to Data Crawler is a Reusable Data Access Interface built in HTML
generated from Perl code. This core component is the basis of the entire
application and enables one to create interrelated storage systems quickly.
This software is 100% HTML based. It is a configurable, reusable interface
for exploring, displaying and editing database information.
Does anybody see what is going on here? Does it make sense?
Any feedback is welcome
Thanks for your time,
Joe Junkin
jjunkin@datacrawler.com
www.datacrawler.com
------------------------------
Date: 9 Jul 1998 15:41:49 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: Perl CGI and warnings [Was: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <6o2obt$or2$6@news.iastate.edu>
Abigail (abigail@fnx.com) wrote:
: Mark W. Schumann (catfood@apk.net) wrote on MDCCLXXII September MCMXCIII
: in <URL: news:6o0uda$ia8@junior.apk.net>:
: ++
: ++ I'm still trying to figure out where the CGI programs would be, other
: ++ than in /yaddayaddayadda/cgi-bin/. Is that an odd out of the way
: ++ place?
: But who cares where they are?
sysadmins who can't foist the work off on users. :)
Josh
--
__________________________________________
She had heard all about excluded middles;
they were bad shit, to be avoided.
- Thomas Pynchon
------------------------------
Date: Thu, 09 Jul 1998 18:29:15 +0200
From: Michael Derfler <michael.derfler@mch.sni.de>
Subject: perl HTTP/1.0 501 Not Supported
Message-Id: <35A4EFDB.234532D4@mch.sni.de>
I am trying to download a file (created from a previous query)
with the following script:
read (STDIN,$data,$ENV{'CONTENT_LENGTH'});
$old=$data;
....
....
<form action=\"http://.../cgi-bin/file.csv?$old\" method=\"post\">
<input type=\"submit\" value=\"Download\"></form>
...
When I try to download the file i get the message:
HTTP/1.0 501 Not Supported
Does any one know a solution to this.
I'm running a NT server with IIS 3.0 and perl5.001, (and FP98)
All of my other scripts work fine.
Thanks in advance
Thanks
Michael
mailto:Michael.Derfler@mch.sni.de
------------------------------
Date: Thu, 09 Jul 1998 14:59:27 GMT
From: lithium@pcmagic.net
Subject: Perl to DB2 interface question
Message-Id: <6o2lsf$ok$1@nnrp1.dejanews.com>
I know that Perl.com offers a DB2 data driver, now there is not much else
attached to it. Does this driver allow for native connectivity to DB2 on a
mainframe? If so, does it work for NT or just unix?
Thanks in advance,
Albert
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 09 Jul 1998 15:58:02 GMT
From: Douglas Galbraith <douglas@home.com>
Subject: secure HTTPS connection module?
Message-Id: <35A4E865.A6949464@home.com>
Is there a module specifically used for HTTPS connections? (I've
grep'ed the doc html pages, and can't find anything.)
I've tried the script below, and "$content" is always empty. I've tried
several secure sites, and gotten the same results (but when I've tried
this url with a browser, I DO get a response).
#!/usr/bin/perl -w
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$request = HTTP::Request->new(GET =>
'https://trading27.schwab.com/trading/miniquote?QuotesSecurityName=IBM');
$response = $ua->request($request);
$content = $response->content();
print $content . "\n";
thanks for the help,
DGalbra862@aol.com
------------------------------
Date: Thu, 9 Jul 1998 15:14:42 GMT
From: erco@netcom.com (Greg Ercolano)
Subject: Re: Serial Port problems...
Message-Id: <ercoEvu2CI.DD1@netcom.com>
zibblepies@my-dejanews.com wrote:
> I'm having problems getting a serial port to respond.
> Bascially, I've got a modem eliminator cable going from one machine to
> another.
You should probably verify that the DTR/DSR/CD are all 'green'
using a break out box, or using a serial port LED monitor
(available from radio shack)
Problems with I/O errors are usually related to these signals
not being properly pulled positive. Unix and the PC want to
see these signals. Just opening the port will pull certain
signals high, which you can then fan out to the inputs which
maybe the PC isn't itself pulling high.
> open(DEV, "+</dev/ttyS1") || die $!;
Hmm, I guess I would have used +>, but I don't see where it
would matter. I might also try to use /dev/cua1, just so that
it locks out any getty's that might be reading the port.
For testing purposes, you might want to simplify things by
just disable any gettys on the port:
1) Edit the /etc/inittab, disable getty on the port
2) kill -1 1 # restart init
3) killall getty ; killall uugetty # nuke leftover gettys
Then when data starts flowing, try enabling them again, and
see if you can get the locking stuff working.
> Now, a few questions.
> Does anyone offhand know the name of the lock files for a serial port under
> linux?
/var/lock/LCK*
See the manpages for the getty(1) / uugetty(1) / pppd(1) / chat(1)
programs you're using, as they create and maintain the lock files.
The lock files usually contain the pid of the program that has the
port locked. In some cases, for outbound connections, I think you
can get away with just openning /dev/cu*, and the kernel puts a hold
on any processes (like getty(1)) hanging off the inbound device
/dev/ttyS*.
> I've read the FAQ that had the section about serial ports.
See /usr/doc/HOWTO/Serial-HOWTO for more info, or grep(1) for lock
from that HOWTO directory.
> The DOS program is running with the com port open as 2400 baud, 8N1 parity.
Hmm, try switching to 9600 to make life simpler. I believe the
default for all unices is to use 9600 unless told otherwise.
> How do I set the baud rate and parity of a serial port?
You have a choice:
Simple way: stty(1)
Right way: ioctl(2)
See 'man stty' for more info on the easy way,
'man termio' and/or 'man perlfunc' for info on
using the ioctl(1) technique. [stty(1) itself
uses ioctl() and termios].
In either case, you have to make your settings _after_
opening the serial port.
stty(1) is probably fine for prototyping:
# (I haven't tested this, but should point you
# in the right direction)
#
unless ( open(FD, "<+/dev/ttyS1") ) { die.. }
system("stty raw 2400 -parenb cs8 < /dev/ttyS1");
You want the 'raw' and 'cs8' in there for sure. The 2400
can be changed to 9600, or for that matter 38400, etc.
See stty(1) for more.
Hope that helps..
-greg
--
/\_/\
|o,o|
\/ )
----mm---------------------------------------------------------------------
Greg Ercolano UNIX NightOwl / Systems Programmer Digital Domain
erco@netcom.com http://3dsite.com/people/erco/ 300 Rose Ave.
Venice, CA 90291
---------------------------------------------------------------------------
------------------------------
Date: 9 Jul 1998 15:50:39 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: Simple (?) Perl maths question
Message-Id: <6o2osf$or2$7@news.iastate.edu>
simsi@my-dejanews.com wrote:
: Hi all,
: Can anyone kindly help with a small problem. I have a number
: (1.67796100340829e-16) which i need to represent in everday normal terms in a
: Perl app? I have been informed that some Math functions in perl are not 100%
: reliable and this app is mission critical so i can't afford that.
You have a number ~ 1e-16 and you don't consider scientific notation
"everyday normal terms"?
This is a question easily answerable with the documentation:
perldoc -f sprintf
/home/kortbein% perl5 -w test.pl
0.000000000000000167796100340829
/home/kortbein% cat test.pl
#!/usr/local/bin/perl5 -w
$a = 1.67796100340829e-16;
$line = sprintf "%1.30f\n", $a;
print $line;
Josh
--
__________________________________________
She had heard all about excluded middles;
they were bad shit, to be avoided.
- Thomas Pynchon
------------------------------
Date: 9 Jul 1998 15:27:11 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: strict and filehandles and subroutines
Message-Id: <6o2ngf$e97$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
pfleury@medicine.bsd.uchicago.edu writes:
:I am trying to pass a filehandle of an open file to a subroutine while I
:am using strict and I am having some trouble with it.
Declare a filehandle this way:
local *FH;
Pass a filehandle this way:
func(*FH);
Receive a filehandle this way:
my $fh = shift;
Use an indirect filehandle this way:
$line = <$fh>;
or this way:
print $fh $data;
Simple.
--tom
--
"A momentary lapse of stupidity" -- Dean Roehrich
------------------------------
Date: Thu, 09 Jul 1998 15:43:14 GMT
From: Scott.L.Erickson@HealthPartners.com (Scott Erickson)
Subject: Where is perldoc?
Message-Id: <35a4e4c7.693961303@news.mr.net>
I have seen many references to something called perldoc, yet, I have
never found this program and I am unable to call it from the Unix
command line. Am I misunderstanding how it is to be used? Where is
this app normally placed?
Scott.
------------------------------
Date: 09 Jul 1998 11:46:36 -0500
From: Quentin Fennessy <quentin.fennessy@amd.com>
Subject: Re: Where is perldoc?
Message-Id: <ximbtqz2cr7.fsf@shaddam.amd.com>
>>>>> "Scott" == Scott Erickson <Scott.L.Erickson@HealthPartners.com> writes:
Scott> I have seen many references to something called perldoc,
Scott> yet, I have never found this program and I am unable to
Scott> call it from the Unix command line. Am I misunderstanding
Scott> how it is to be used? Where is this app normally placed?
perldoc is installed with perl in current versions of the
distribution. So if your perl binary is in /usr/local/bin then
perldoc should be there as well. If not, you have an incomplete
installation. Those darn sysadmins!
>From the POD within perldoc:
PERLDOC(1) User Contributed Perl Documentation PERLDOC(1)
NAME
perldoc - Look up Perl documentation in pod format.
SYNOPSIS
perldoc [-h] [-v] [-t] [-u] [-m] [-l]
PageName|ModuleName|ProgramName
perldoc -f BuiltinFunction
DESCRIPTION
perldoc looks up a piece of documentation in .pod format
that is embedded in the perl installation tree or in a perl
script, and displays it via pod2man | nroff -man | $PAGER.
(In addition, if running under HP-UX, col -x will be used.)
This is primarily used for the documentation for the perl
library modules.
[...]
--
Quentin Fennessy AMD, Austin Texas
(a sysadmin)
------------------------------
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 3107
**************************************