[11085] in Perl-Users-Digest
Perl-Users Digest, Issue: 4685 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 19 05:05:10 1999
Date: Tue, 19 Jan 99 02: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 Tue, 19 Jan 1999 Volume: 8 Number: 4685
Today's topics:
"Back button" in CGI script <mr.marketing@worldnet.att.net>
Re: Array slices with a maximum length (Bart Lateur)
Re: Calculate next [mon..sun]day <aqumsieh@matrox.com>
Re: Can I do this is Perl? (Kenneth A Graves)
Re: Can I do this is Perl? <jdf@pobox.com>
Re: Connecting to a SQL Server Database <woerdehoff@sdm.de>
Re: hard disk copy <pasha@actcom.co.il>
Re: How to link image in Perl script ? (Thomas Klinger)
Re: How to link image in Perl script ? (Larry Rosler)
Re: How to link image in Perl script ? <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Is perl the right choise for the following job? <eugene@snailgem.org>
Re: Looking for CGI modules (Tad McClellan)
Matching variable patterns <geksiong@uclink4.berkeley.edu>
Re: Matching variable patterns (Larry Rosler)
Re: Odering an Array <aqumsieh@matrox.com>
Re: Order form/Credit Cards <ebohlman@netcom.com>
Re: passing regexp modifiers in a scalar <aqumsieh@matrox.com>
Re: pattern matching between multiple lines in a file <jdf@pobox.com>
Re: pattern matching between multiple lines in a file <sysop@scbbs.com>
Re: Perl Criticism (Tad McClellan)
Re: Perl Criticism <uri@home.sysarch.com>
Re: Perl Web browser problem (Tad McClellan)
Re: Perl Web browser problem (Tad McClellan)
Re: Perl Web browser problem (Tad McClellan)
Re: Perl Web browser problem (Tad McClellan)
Perl, MySQL, and Hassan shopping cart. KernelKlink@webtv.net
Re: Questions about cookies <jdf@pobox.com>
Send Signal when perl exit ??? (root)
sniffer stlam@yahoo.com
Re: Statistics for comp.lang.perl.misc (Bart Lateur)
Sys::Syslog problem <bench@surfshop.net.ph>
Re: Sys::Syslog problem <rra@stanford.edu>
Re: Using PerlScript with MS Personal Web Server (ASP) mwilliams@europarl.eu.int
why is mod_perl weird? <dave@northnet.com.au>
Re: why is mod_perl weird? <jdf@pobox.com>
Re: Win32::ODBC, Perl SQL vs. standard SQL <woerdehoff@sdm.de>
{ERL WISHLIST: dates, voting (Glen Gower)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 19 Jan 1999 05:08:43 GMT
From: "Joel M. Borden" <mr.marketing@worldnet.att.net>
Subject: "Back button" in CGI script
Message-Id: <36A4134D.4BD2@worldnet.att.net>
Pardon a newbie question...
I just got my first script working (a simple mail-generating form)... it
does error-checking, and if required info is missing, I'd like to provde
a "back" link to the HTML page that had the original form, so that the
partial info entered by the user will be retained.
I can pass the script the form file's name, and provide a link back to
it, but that reloads the form, losing the info. I want to duplicate the
browser's "back button" functionality.
If you can, please cc: your response to me via email, as I don't always
get to check the newsgroups at work.
Thanks!
--
Joel Borden
Mr. Marketing
mr.marketing@worldnet.att.net
------------------------------
Date: Tue, 19 Jan 1999 09:36:55 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Array slices with a maximum length
Message-Id: <36aa51f0.3916427@news.skynet.be>
Ronald J Kimball wrote:
>I like this one:
>
>sub min { $_[$_[1]<$_[0]] }
#! perl -w
print min(1,2);
>>
1
I don't get it.
print 2<1;
>>
Nothing.
So, why is there, in the first sample, no warning that the subscript
isn't numeric or something? Are maybe these warnings suppressed when
using the outcome of a logical test?
Bart.
------------------------------
Date: Mon, 18 Jan 1999 18:23:23 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Calculate next [mon..sun]day
Message-Id: <x3yaezgjhck.fsf@tigre.matrox.com>
marcel_anthonijsz@my-dejanews.com writes:
> I want to calculate the date of next [mon..sun]day, what is the easiest and
> most nice way to do this? It should work after the year 0 .. (Hey, my brain
> has a Y2K bug!).
Personally, I would use one of the Time::* modules.
But, here's an easy way (any bugs?):
$time = time;
$today = (localtime($time))[6];
$tomorrow = (localtime($time + 24*60*60))[6];
perldoc -f localtime
perldoc -f time
------------------------------
Date: 19 Jan 1999 05:27:55 GMT
From: kag@kag.citysource.com (Kenneth A Graves)
Subject: Re: Can I do this is Perl?
Message-Id: <slrn7a85re.io.kag@kag.citysource.com>
On Mon, 18 Jan 1999 22:25:11 -0500, Darrel Davis <darreld@mail.his.com> wrote:
>This program listens on a port for connections; takes connections;
>spawns threads (for now, I think I'll have enough connections that
>I'll have to go to processes soon as threads become inefficient
>after a while);
Might as well go to processes when you port to Perl. Thread support
was still experimental last I checked, but forking processes is well
supported and documented. (See the Perl Cookbook, for example.)
>read data from the port char at a time since It's a
>proprietary protocol without CR/NL's. When I get a packet, I check
>the verb, then I do the appropriate thing and build and send back
>a packet.
man perlfaq5
perldoc -f getc
This can be inefficient though. Consider using read to grab a
buffer-full of data, then parse that. (I'd mention the Perl Cookbook
again, but it would sound like I'm on commission, so I won't.)
Or if there is a separation character, but it isn't newline, then
you could set $/, then use <FH> as usual. man perlvar for details
on $/.
--kag
------------------------------
Date: 19 Jan 1999 06:44:03 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: Darrel Davis <darreld@mail.his.com>
Subject: Re: Can I do this is Perl?
Message-Id: <m3sod7akbg.fsf@joshua.panix.com>
Darrel Davis <darreld@mail.his.com> writes:
> In short, I need multithreading, sockets, reading variable length packets
> from sockets, database. Doable?
I doubt you really *need* multithreading; I think judicious use of
fork() and/or select() will buy you what you need. If you really need
threads, then an up-to-date perl will give them to you, but
(currently) at a cost in raw speed. See the Camel and Ram books for
various ways of creating servers that handle multiple simultaneous
connections. ( _Programming Perl_ and _Perl Cookbook_, both from
O'Reilly).
Sockets? Yes, and trivial with the IO::Socket module.
Variable length packets from sockets?
$ perldoc -f recv
$ perldoc -f send
$ perldoc IO::Socket
Database? Hell yes. Install DBI and your DBDs of choice.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Tue, 19 Jan 1999 10:28:53 +0100
From: Hendrik =?iso-8859-1?Q?W=F6rdehoff?= <woerdehoff@sdm.de>
Subject: Re: Connecting to a SQL Server Database
Message-Id: <36A45055.93FAB05@sdm.de>
ranjeev_s._pamnani@hud.gov wrote:
> I am new to Perl and need to write a Perl Script to run a query on MS SQL
> Server 6.5 DB and write the results of the query in a file.
>
> How can I do this? I am not aware of any system libraries that might be
> required. Please let me know if there are some sample scripts for this purpose
> which would help me a lot.
If you are running Perl in a Win32 environment:
Just grab DBI/DBD::ODBC or Win32::ODBC from CPAN and install it (if not
already installed), learn SQL and maybe read up on ODBC (only if
necessary), read the documentation of the installed modules, create an
ODBC data source for your SQL Server, write a Perl program with
DBI/DBD::ODBC or Win32::ODBC that connects to this ODBC data source.
If you know how to use ODBC or some similar database API (eg. IBMs CLI)
in any other programming language (that's pure ODBC, not some fancy MFC
stuff) you should be ready to go.
If you want to use Perl on Unix/Linux:
Mail me.
Yours
Hendrik
Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227,
any and all unsolicited commercial E-mail sent to this address
is subject to a download and archival fee in the amount of $500
US (per infraction). E-mailing denotes acceptance of these terms.
--
Hendrik W"ordehoff |s |d &|m | software design & management
| | | | GmbH & Co. KG :
woerdehoff@sdm.de | | | | Thomas-Dehler-Str. 27 >B)
Tel/Fax (089) 63812-337/515 81737 M"unchen :
------------------------------
Date: Tue, 19 Jan 1999 08:26:23 +0200
From: Pasha Zusmanovich <pasha@actcom.co.il>
Subject: Re: hard disk copy
Message-Id: <36A4258F.AD6E7C6D@actcom.co.il>
Brian McCauley wrote:
>
>
> > Pasha Zusmanovich -------o x x "What i tell you three times is true."
> > pasha@actcom.co.il o o x L.Carroll, "The Hunting of the Snark"
>
> Thanks, how did you guess I'd been trying to remember where that
> quotation came from. :-)
>
Ah, glad to be useful, if not with hard disk layouts than with Lewis
Carrol quotations. But... Today (totally coincendentially of course) I
opened the Camel Book on p. 549 and found there: "That which I tell you
three times is true" (without mentioning L.C. and followed by some smart
advice repeated three times). So I wonder whether this is plagiarism (oh
- dare I even think about that?) or clever japh's came to this wise
saying independently.
--
Pasha Zusmanovich -------o x x "What i tell you three times is true."
pasha@actcom.co.il o o x L.Carroll, "The Hunting of the Snark"
www.actcom.co.il/~pasha x x o---------------------------------------
------------------------------
Date: Tue, 19 Jan 1999 09:00:16 GMT
From: t.klinger@mobilkom.at (Thomas Klinger)
Subject: Re: How to link image in Perl script ?
Message-Id: <36a44915.6652329@194.48.138.240>
On Tue, 19 Jan 1999 12:01:28 +0800, Alex <ex5316@netvigator.com>
wrote:
> print "<CENTER><IMG SRC="mainlogo.gif" HEIGHT=54 WIDTH=577></CENTER>";
---------------------------------------^-------------^
Try the marked ones to escape. I hope this was only a typo. If not
this is your problem.
print "<CENTER><IMG SRC=\"mainlogo.gif\" HEIGHT=54
WIDTH=577></CENTER>";
Kind regards
Thomas Klinger
Systemspecialist
=======================================
t.klinger@mobilkom.at
http://www.mobilkom.at
=======================================
------------------------------
Date: Tue, 19 Jan 1999 01:35:05 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to link image in Perl script ?
Message-Id: <MPG.110df19f531327199899a1@nntp.hpl.hp.com>
In article <36a44915.6652329@194.48.138.240>, Thomas Klinger
<t.klinger@mobilkom.at> says...
> On Tue, 19 Jan 1999 12:01:28 +0800, Alex <ex5316@netvigator.com>
> wrote:
> > print "<CENTER><IMG SRC="mainlogo.gif" HEIGHT=54 WIDTH=577></CENTER>";
> ---------------------------^------------^
> Try the marked ones to escape. I hope this was only a typo. If not
> this is your problem.
>
> print "<CENTER><IMG SRC=\"mainlogo.gif\" HEIGHT=54 WIDTH=577></CENTER>";
Small yeccch. Much clearer:
print '<CENTER><IMG SRC="mainlogo.gif" HEIGHT=54 WIDTH=577></CENTER>';
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 19 Jan 1999 10:55:37 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: How to link image in Perl script ?
Message-Id: <83k8yjbn8m.fsf@vcpc.univie.ac.at>
Re: How to link image in Perl script ?, Larry
<lr@hpl.hp.com> said:
Larry> In article <36a44915.6652329@194.48.138.240>,
Larry> Thomas Klinger <t.klinger@mobilkom.at>
Larry> says...
>> On Tue, 19 Jan 1999 12:01:28 +0800, Alex
>> <ex5316@netvigator.com> wrote: > print
>> "<CENTER><IMG SRC="mainlogo.gif" HEIGHT=54
>> WIDTH=577></CENTER>";
>> ---------------------------^------------^ Try the
>> marked ones to escape. I hope this was only a
>> typo. If not this is your problem.
>>
>> print "<CENTER><IMG SRC=\"mainlogo.gif\"
>> HEIGHT=54 WIDTH=577></CENTER>";
Larry> Small yeccch. Much clearer:
Larry> print '<CENTER><IMG SRC="mainlogo.gif"
Larry> HEIGHT=54 WIDTH=577></CENTER>';
Even clearer still?
use CGI qw(:all);
print center(img({src => 'mainlogo.gif',
height => 54, width => 577}));
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Tue, 19 Jan 1999 00:14:17 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: Is perl the right choise for the following job?
Message-Id: <36A414A9.684B9F1B@snailgem.org>
John Chambers wrote:
> Hmmm ... The CPAN archives seem to have HTML::Simple, but there
> doesn't seem to be any LWP::Simple. I grabbed the latest LWP and
> installed it, and "man LWP::Simple" says "not found".
>
> Where do you get it?
>
> One problem is that the CPAN module list contains the word "simple"
> about a zillion times, so it's not worth much as a search keyword.
It should have been installed with the lwp bundle.
Try perldoc LWP::Simple
Look for in something like:
/usr/lib/perl5/site_perl/LWP
--
Eugene
"I have an Apache Web Server that uses CGI forms written in COBOL."
Post in clpm
------------------------------
Date: Mon, 18 Jan 1999 22:26:18 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Looking for CGI modules
Message-Id: <ah1187.93d.ln@magna.metronet.com>
Mick Farmer (mick@picus.dcs.bbk.ac.uk) wrote:
Dear Mick,
I think you must be answering someone else's question.
Because I don't think I asked one ;-)
: Dear Tad,
: Try the CGI.pm module on CPAN.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 19 Jan 1999 08:19:30 GMT
From: "Low Gek Siong" <geksiong@uclink4.berkeley.edu>
Subject: Matching variable patterns
Message-Id: <01be4384$120341e0$4e449888@little-gecko>
Hi, I have this very frustrating problem with pattern matching. I want to
extract the contents between a set of tags <q1>....</q1>, <q2>....</q2>,
<q3>...</q3>, etc. To do this I would need to keep a $count of the current
number, and match a variable pattern, while extracting the contents between
the tags (using $1). But I was unable to make it work.
I searched on Dejanews for similar questions, but it was difficult to find
what I want. Some solutions suggested escaping the $ in a pattern, but it
didn't work, and what I need is to extract the back-references as well.
Please email me as well. This is the first time I'm here.
Thanks
Gek Siong
------------------------------
Date: Tue, 19 Jan 1999 01:26:35 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Matching variable patterns
Message-Id: <MPG.110defa0393c33239899a0@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <01be4384$120341e0$4e449888@little-gecko>, Low Gek Siong
<geksiong@uclink4.berkeley.edu> says...
> Hi, I have this very frustrating problem with pattern matching. I want to
> extract the contents between a set of tags <q1>....</q1>, <q2>....</q2>,
> <q3>...</q3>, etc. To do this I would need to keep a $count of the current
> number, and match a variable pattern, while extracting the contents between
> the tags (using $1). But I was unable to make it work.
>
> I searched on Dejanews for similar questions, but it was difficult to find
> what I want. Some solutions suggested escaping the $ in a pattern, but it
> didn't work, and what I need is to extract the back-references as well.
Your problem statement is rather vague. The following does what I think
you want. Alternate members of the output are the numbers in the tags
(the back-references?) and the contents of the tags. But the tags do not
have to be in ascending order, as you see.
#!/usr/local/bin/perl -w
use strict;
$_ = '<q3>3333</q3> <q2>2222</q2> <q1>11
11</q1> <q10><q1></q10>';
my @a = m!<q(\d+)>(.*?)</q\1>!gs;
print "@a\n";
__END__
produces:
3 3333 2 2222 1 11
11 10 <q1>
> Please email me as well. This is the first time I'm here.
So??? But I've done it anyhow. Do come back again! :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 18 Jan 1999 19:07:54 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Odering an Array
Message-Id: <x3y90f0jfae.fsf@tigre.matrox.com>
cbleask@olemiss.edu writes:
> Given an array of real numbers, say A whose index from 1 to 100.
> How could I write a program to produce a list or print out which gives each
> element's order?
from perlfaq4:
How do I sort an array by (anything)?
------------------------------
Date: Tue, 19 Jan 1999 06:48:10 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Order form/Credit Cards
Message-Id: <ebohlmanF5so8A.MAn@netcom.com>
Brian Thompson <hitbyabus@mindspring.com> wrote:
: I have an order form that is kind of like Formail, only I added the ablility
: to reply to the customer, and then database the order. I am needing to add
: another subroutine that sends the credit card information to authorize.net
: for validation. How do I get the script to post the variables to the script
: on authorize.net without the user ever knowing what is going on?
Since you asked in a Perl group, the most likely answer is to use LWP to
connect to the authorization server and handle the transaction; see the
documentation for the various LWP modules, as well as the LWP cookbook
that comes with the modules, for more information.
------------------------------
Date: Mon, 18 Jan 1999 19:26:27 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: passing regexp modifiers in a scalar
Message-Id: <x3y7lukjefm.fsf@tigre.matrox.com>
"Phil R Lawrence" <prl2@lehigh.edu> writes:
> However, I want to be able to pass in regexp modifiers, as well as the regexp
> itself, ala:
> $retval = eval { $input =~ /$params->{regexp}/$params->{regexp_mods} };
Consider the following:
% perl -w
$mod = "i";
$text = "This";
$regex = "this";
$to_eval = <<MMM;
if ($text =~ /$regex/$mod) {
print "YEEHA.\n";
}
MMM
eval $to_eval;
__END__
This prints:
YEEHA.
------------------------------
Date: 19 Jan 1999 06:33:33 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: Ron Parker <sysop@scbbs.com>
Subject: Re: pattern matching between multiple lines in a file
Message-Id: <m3vhi3aksy.fsf@joshua.panix.com>
Ron Parker <sysop@scbbs.com> writes:
> TITLE1
>
> Blah Blah
>
> TITLE2
>
> Blah Blah
> Blah Blah Blah
>
> I want to replace the pattern and re-write to the file:
>
> TITLE1 Blah Blah
> TITLE2 Blah Blah Blah Blah Blah
I think that you're too stuck on the regex idea, and that a relatively
simple solution is therefore eluding you.
$current_title_line = '';
while (<>) {
chomp;
next if /^\s*$/;
if /(TITLE\d+)/ {
print "$current_title_line\n" if $current_title_line;
$current_title_line = "$1 ";
}
else {
$current_title_line .= "$_ ";
}
}
print $current_title_line;
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Tue, 19 Jan 1999 09:22:40 GMT
From: Ron Parker <sysop@scbbs.com>
Subject: Re: pattern matching between multiple lines in a file
Message-Id: <36A4501C.F04589DC@scbbs.com>
Thanks for the response. I should have been more specific. You are right
in that I've been simply unable to think of another way of doing this.
However, the task is a bit more complex than the example I gave. There
are three parts to the text:
TITLE (this is the title which is in a format I can grab)
Blah Blah Blah (this is the description of the title which can be from 1
to 5 lines long)
Blah Blah: (one thing I have working for me is that the title
description always ends)
(with ":")
Regular Text (this is the rest of the text I don't want to touch)
Now, I wish to put the TITLE and the title description on the same line,
and leave the regular text alone. So, I will end up with:
TITLE Blah Blah Blah Blah Blah:
Regular Text
... and do the same when I hit the next title which fits the bill.
Your solution, responding to the incorrect example I gave, assumes that
there are only the TITLEs and descriptions in the file.
I don't know what the regular text is going to be. I only know what
pattern of the TITLE will be, and that the description, no matter how many
lines, will end with ":". I wish to re-write the TITLE and description in
updated format, and re-write the regular text which follows each as it is.
You have given me an idea, however. What do you think of the following:
while (<FILE>) {
chomp;
$line = $_;
if /(TITLE\d+)/ {
&read_title_lines;
}else{
print "$line\n";
}
sub read_title_lines {
$stop = "n";
while ($stop eq "n") {
$input = <FILE>;
next if $input =~ /^\s*$/;
$line .= $input;
if ($line =~ /:/) {
$stop = "y";
}
}
print "$line\n";
}
I've never tried this, but logically, when "read_title_lines" returns to
the original routine, will the read record buffer be advanced correctly?
Again, thanks for the response.
-ron
Jonathan Feinberg wrote:
> The following message is a courtesy copy of an article
> that has been posted to comp.lang.perl.misc as well.
>
> Ron Parker <sysop@scbbs.com> writes:
>
> > TITLE1
> >
> > Blah Blah
> >
> > TITLE2
> >
> > Blah Blah
> > Blah Blah Blah
> >
> > I want to replace the pattern and re-write to the file:
> >
> > TITLE1 Blah Blah
> > TITLE2 Blah Blah Blah Blah Blah
>
> I think that you're too stuck on the regex idea, and that a relatively
> simple solution is therefore eluding you.
>
> $current_title_line = '';
> while (<>) {
> chomp;
> next if /^\s*$/;
> if /(TITLE\d+)/ {
> print "$current_title_line\n" if $current_title_line;
> $current_title_line = "$1 ";
> }
> else {
> $current_title_line .= "$_ ";
> }
> }
> print $current_title_line;
>
> --
> Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
> http://pobox.com/~jdf
--
Ron Parker
Software Creations http://www.scbbs.com
TradeWinds Publishing http://www.intl-trade.com
TradePoint Los Angeles http://www.tradepointla.org
------------------------------
Date: Mon, 18 Jan 1999 22:20:44 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Criticism
Message-Id: <s61187.93d.ln@magna.metronet.com>
Tad McClellan (tadmc@metronet.com) wrote:
: : In article <77terh$um$1@nnrp1.dejanews.com>,
: : topmind@technologist.com wrote:
: : > It must be that I am reaching celebrity
: : > status in this group
: Don't be getting all puffed up about celebrity status.
: Daffy Duck is a celebrity...
Oh yeah.
There was some other celebrity I wanted to see mentioned
in this thread...
... now who was that...
... (scratch head)...
Oh! Now I remember...
... Adolph Hitler is a celebrity!
And with that, this thread is now free to ride off into
the sunset.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 19 Jan 1999 00:46:32 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Perl Criticism
Message-Id: <x767a3g6h3.fsf@home.sysarch.com>
>>>>> "TM" == Tad McClellan <tadmc@metronet.com> writes:
TM> ... Adolph Hitler is a celebrity!
TM> And with that, this thread is now free to ride off into
TM> the sunset.
DING! DING! DING! DING! DING! DING! DING!
this thread is officially over. ten rounds of brutal logical
arguments. and the loser is:
bottommind, who reesed himself unconcious. never once did he back up his
flaming and ranting with any actual working code, in perl on any other
language. he resorted to poor quality verbal abuse and cursing (he would
have won more point on the judge's card if he were creative in that
arena). he was too stupid to even know when he was beaten like the upper
class twits of the year. oh my god, he just ran himself over with his
own car!
what amazes me is why we get these bozos, who even in the face of
superior logic and intelligence, keep trying to convert the great masses
of perl hackers to some straightjacketed, do it my way or else
language. we are Perl hackers and we are proud of the choices we have.
TIMTOWTDI!
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 18 Jan 1999 22:30:58 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Web browser problem
Message-Id: <2q1187.93d.ln@magna.metronet.com>
Ian (ijp@thornlea.force9.co.uk) wrote:
: Sorry if i intruded on your little power trip..
That's OK.
You won't be intruding on me anymore.
*plonk*
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 23:12:33 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Web browser problem
Message-Id: <184187.99d.ln@magna.metronet.com>
Daniel Grisinger (dgris@moiraine.dimensional.com) wrote:
: "Ian" <ijp@thornlea.force9.co.uk> writes:
: > give the guy a break, it's obvious (well to most people anyway) what he
: > means, why do you have to try to be so clever, secondly if the post isn't
: Why do you
: think that you have any position to be telling us what is and isn't
: acceptable for us to talk about?
He has been posting here for a whole two weeks already.
He doesn't mind off-topic postings yet.
He has probably only encountered a few dozen of them.
Let's wait and see how he reacts in a few years after having
suffered though a few thousand of them too.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 23:07:15 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Web browser problem
Message-Id: <3u3187.99d.ln@magna.metronet.com>
Ian (ijp@thornlea.force9.co.uk) wrote:
: >: However when I want to run it in a browser
^^
^^
: >
: >
: > You cannot run perl in a browser (client).
: give the guy a break, it's obvious (well to most people anyway) what he
: means,
Oh?
If he had said "from a browser" instead, _then_ it would have
been obvious what he meant.
Sounds to me like he wanted a Perl applet.
Understanding how client/server works is very helpful in
being able to troubleshoot a client/server system such as
CGI programs.
So I thought correcting his misperception would help him with
both his current, and future, CGI debugging.
How does _your_ posting help him (or anybody else)?
: why do you have to try to be so clever, secondly if the post isn't
: totally relevant whats the point in sending pedantic responses, just wastes
: your time in writing them, and everyone else's time in downloading them.
It was not pedantic.
It was correcting an error in his thinking.
Maybe the misunderstanding was just due to sloppy phrasing.
But being technical here is pretty much a given, seeing
as it is a technical subject area.
[ snip _entire_ quoted article.
You should only quote parts of the article that you are going
to comment on, else you waste disk space on tens of thousands
of computers around the world.
]
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 23:21:15 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Web browser problem
Message-Id: <bo4187.99d.ln@magna.metronet.com>
Ian (ijp@thornlea.force9.co.uk) wrote:
: case in point, taken from a post by your buddy tad: - seems to have some
: repressed anger (or something)
Strange.
I was just thinking the same thing about you.
Guess it is the effect of point of view...
: >> It does not merely _resemble_ source code, it _is_ source code.
: >>
: >> It runs fine and produces sensible output
: >> (Usually "just another perl hacker").
: >>
: >> Come back when you know what you're talking about.
: so this group is your and his personal domain?,
If it was, you wouldn't be posting here.
And you are, so it isn't.
Or was that meant to be a rhetorical question?
( _that_ was a rhetorical question, because I won't be seeing
any of your future postings.
)
: where you're the masters of all you survey... is that it?
^^
^^
No.
JAPHs are a pretty common thing in the Perl world.
"it" is that that poster did, in fact, not know what he was
talking about, else he wouldn't have qualified it with
"resembling".
Though I must admit that I was pointing out the obvious.
Most folks could already see that he did not know what he
was talking about.
: Sorry if i intruded on your little power trip..
: Ian
: Daniel Grisinger wrote in message ...
: >"Ian" <ijp@thornlea.force9.co.uk> writes:
: >
: >> give the guy a break, it's obvious (well to most people anyway) what he
: >> means, why do you have to try to be so clever, secondly if the post isn't
: >
: >Give Tad a break. It's obvious that the reason that most of us hang
: >out here is because we like to talk about perl. Why do you have to
[ snip _entire_ quoted article.
You should only quote parts of the article that you are going
to comment on, else you waste disk space on tens of thousands
of computers around the world.
]
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 19 Jan 1999 01:39:52 -0500 (EST)
From: KernelKlink@webtv.net
Subject: Perl, MySQL, and Hassan shopping cart.
Message-Id: <27551-36A428B8-49@newsd-104.iap.bryant.webtv.net>
I am on a UNIX machine running Apache. The server supports Perl, MySQL,
and the Hassan shopping cart script that I want to use.
Can anyone tell me if the following can be done with Perl script(s)
Interfacing with the shopping cart and the MySQL database?
"When someone goes to a product page on my site I want the current
number of items in stock to display next to the item. When the person
orders a product via the shopping cart "add to cart" option, I want the
MySQL database to be debited that item at checkout time so that the next
person to visit the product page will see the current number of that
item in stock."
I'm a do-it-youselfer, so I just need to know if it CAN be done before I
roll up my sleeves and dig in.
------------------------------
Date: 19 Jan 1999 06:48:18 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: "John" <jdebay@earthlink.net>
Subject: Re: Questions about cookies
Message-Id: <m3pv8bak4d.fsf@joshua.panix.com>
"John" <jdebay@earthlink.net> writes:
> I try to read the HTTP_COOKIES (or whatever it is) envoronment
> variable, but it doesn't contain any data.
"Or whatever it is"?
It's impossible to know what you're doing wrong without seeing your
code.
I can tell you, though, that you'd do yourself a favor to start using
the CGI module that comes with perl, since it provides a clean
interface to the problem of getting and setting cookies.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 19 Jan 1999 06:36:46 GMT
From: root@tbsky.unicap.com.tw (root)
Subject: Send Signal when perl exit ???
Message-Id: <78195u$gqf$1@news.seed.net.tw>
i m writing two script that working together by sending each other signals..
the problem is that when one script terminate (exit,die), the other don't
know and still stay running in memory...
so can i send signals to others when my perl program exit or die ?
------------------------------
Date: Tue, 19 Jan 1999 06:05:26 GMT
From: stlam@yahoo.com
Subject: sniffer
Message-Id: <7817b1$70h$1@nnrp1.dejanews.com>
hi all,
Which perl module can get ethernet tcp packet raw data?
Any example code.
Thanks,
Lam
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 19 Jan 1999 09:37:09 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <36a84e4c.2986601@news.skynet.be>
Greg Bacon wrote:
> - 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+>|\+\+)/.
>Top 10 Posters by OCR (minimum of five posts)
>==============================================
>
> (kb) (kb)
>OCR orig / body Posts Address
>----- -------------- ----- -------
>
>0.981 ( 11.5 / 11.7) 21 fl_aggie@thepentagon.com (I R A Aggie)
>0.932 ( 25.7 / 27.5) 49 abigail@fnx.com
I object! Abigail cheated!
I noticed that Abigail lately used a different "quoting" character
string, every few posts. Most were NOT caught by this filter.
3 current examples (unquoted):
September MCMXCIII in <URL:news:77uhb5$t5j$1@nnrp1.dejanews.com>:
[] I need to find a way to return a certain character of a string,
counting from
[] the beginning
[] ie: string = 'abcd', character 1 of string = 'a', 2='b', etc
Giga Tron (gigatronman@email.com) wrote on MCMLXIII September MCMXCIII
in <URL:news:369f49c7.5755816@news.mtt.net>:
&&
&& how can I set the current position in a file. do something and then
&& continue from that position
Phlip (new_email@see.web.page) wrote on MCMLXIV September MCMXCIII in
<URL:news:77qo3u$lq7@journal.concentric.net>:
"" Newsgroupies
""
"" Perl users, for some reason moreso than for other languages, like to
"" invent strings of nonsense that vaguely resemble source code and put
"" them in their signature files, like this:
Not that I care much, but I *was* looking out for the statistics. ;-)
Bart.
------------------------------
Date: Tue, 19 Jan 1999 12:53:00 +0800
From: "Benjamin" <bench@surfshop.net.ph>
Subject: Sys::Syslog problem
Message-Id: <781388$8c$1@tempo.news.iphil.net>
why is that perl complains:
Can't locate stdarg.ph in @INC (did you run h2ph?) (@INC contains:
/usr/lib/perl5/i386-linux/5.00404 /usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl .) at
/usr/lib/perl5/i386-linux/5.00404/sys/syslog.ph line 160.
BEGIN failed--compilation aborted at syslog line 3.
any ideas?
------------------------------
Date: 18 Jan 1999 21:21:09 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Sys::Syslog problem
Message-Id: <yl90ezu9bu.fsf@windlord.stanford.edu>
Benjamin <bench@surfshop.net.ph> writes:
> why is that perl complains:
> Can't locate stdarg.ph in @INC (did you run h2ph?) (@INC contains:
> /usr/lib/perl5/i386-linux/5.00404 /usr/lib/perl5
> /usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl .) at
> /usr/lib/perl5/i386-linux/5.00404/sys/syslog.ph line 160.
> BEGIN failed--compilation aborted at syslog line 3.
Do you have a /usr/include/stdarg.h and do you have a stdarg.ph in your
Perl library directories? If the answers are yes and no, are you sure you
ran h2ph on everything?
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Tue, 19 Jan 1999 09:11:01 GMT
From: mwilliams@europarl.eu.int
Subject: Re: Using PerlScript with MS Personal Web Server (ASP)
Message-Id: <781i70$gh0$1@nnrp1.dejanews.com>
I have the same proble, my IIS can run .pl and .plx (Perlis.dll) but for some
reason the server will not run ASP server side scripts, I have done a
reinstallation.
Have you any Idea where IIS gets its information on what to do when it meets
the PerlScript keyword in an ASP, beause at the moment it treats the
perlscript as if it were Vbscript.
In article <3699CE24.CA37C61@eml.ericsson.se>,
Matt Sergeant <matthew.sergeant@eml.ericsson.se> wrote:
> Praveen wrote:
> >
> > Tryin to use PerlScript in ASP pages on personal web server. NT
> > workstation4.0.
>
> > $Response->writeblock(0); $Response = $main::Response; error '80004005'
> >
> > Can't call method "writeblock" on an undefined value.
>
> The installation didn't work correctly. Try it again. Make sure you are
> Administrator.
>
> --
> <Matt email="matt@teamamiga.org" />
>
> | Fastnet Software Ltd | Perl in Active Server Pages |
> | Perl Consultancy, Web Development | Database Design | XML |
> | http://come.to/fastnet | Information Consolidation |
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 19 Jan 1999 16:35:40 +1100
From: David Nillesen <dave@northnet.com.au>
Subject: why is mod_perl weird?
Message-Id: <36A419AC.13F3F524@northnet.com.au>
I seem to be missing some underlying truth here.
My program runs fine from the command line. with -w and strict.
absolutley no errors.
Yet mod_perl seems to behave differently.
I am ending up with html code going into a file i opened for a read
only.
use CGI q(:standard);
my $admin=Admin->newinstance;
#verify input data is all there
my $name=param("name") || $admin->html_error("No name entry found");
my $description=param("description") || $admin->html_error("No
description entry found");
my $home=param("home") || $admin->html_error("No home entry found");
$admin->html is a subroutine that takes the string passed to it and puts
it in a nice html error page and exits.
However i end up with the html in a file i open later in the program.
which shoudnt happen cos i have exited. Are subroutines different under
mod_perl? when i use exit am i only dropping from the current subroutine
instead of the whole program? if so why?
please for the sake of my sanity , what is happening??
--
David Nillesen
dave@northnet.com.au
Northnet Internet Services (02)67749300
------------------------------
Date: 19 Jan 1999 07:10:06 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: David Nillesen <dave@northnet.com.au>
Subject: Re: why is mod_perl weird?
Message-Id: <m3k8yjaj41.fsf@joshua.panix.com>
David Nillesen <dave@northnet.com.au> writes:
> However i end up with the html in a file i open later in the program.
> which shoudnt happen cos i have exited. Are subroutines different under
> mod_perl? when i use exit am i only dropping from the current subroutine
> instead of the whole program? if so why?
First monk: "Perl is weird."
Second monk: "mod_perl is weird."
Basho: "It is your mind that is weird."
$ perldoc cgi_to_mod_perl
CGI lets you get away with sloppy programming,
mod_perl does not. Why? CGI scripts have the
lifetime of a single HTTP request as a separate
process. When the request is over, the process goes
away and everything is cleaned up for you, e.g.
globals variables, open files, etc. Scripts running
under mod_perl have a longer lifetime, over several
request, different scripts may be in the same process.
$ perldoc mod_perl_traps
Migrating from CGI
o Be sure to have read the cgi_to_mod_perl manpage
o Output of system, exec and open PIPE, "|program" calls
will not be sent to the browser unless you Perl was
configured with sfio.
o Perl's exit() built-in function cannot be used in
mod_perl scripts. The Apache::exit() function should
be used instead. Apache::exit() automatically
overrides the built-in exit() for Apache::Registry
scripts.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Tue, 19 Jan 1999 10:13:36 +0100
From: Hendrik =?iso-8859-1?Q?W=F6rdehoff?= <woerdehoff@sdm.de>
Subject: Re: Win32::ODBC, Perl SQL vs. standard SQL
Message-Id: <36A44CC0.E12089BB@sdm.de>
Douglas Leonard wrote:
>
> I am looking for a list of character differences between standard SQL
> and SQL commands run from Perl using Win32::ODBC.
>
> I know there are some differences in how certain characters are
> implemented, but I need a list of exactly which characters and
> commands are different. I have done some searching on the net through
> such pages as Dave Roth's great site, but I haven't found any
> comprehensive documents on what I am looking for.
>
> Anyway, thanks in advance;
> <Douglas Leonard>
Win32::ODBC or DBI/DBD::ODBC just show the same behaviour as any other
ODBC application. So read up on ODBC.
If I read your question right you want to know how character data get's
transformed when stored in or retrieved from a database. That mainly
depends on the database you use and its language settings.
If you want to know which SQL commands you can use with ODBC just look
the documentation of your database and your ODBC driver. They should
also talk about "ODBC escape clauses" there.
Yours
Hendrik
Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227,
any and all unsolicited commercial E-mail sent to this address
is subject to a download and archival fee in the amount of $500
US (per infraction). E-mailing denotes acceptance of these terms.
--
Hendrik W"ordehoff |s |d &|m | software design & management
| | | | GmbH & Co. KG :
woerdehoff@sdm.de | | | | Thomas-Dehler-Str. 27 >B)
Tel/Fax (089) 63812-337/515 81737 M"unchen :
------------------------------
Date: 19 Jan 1999 06:24:05 GMT
From: ggower@chat.carleton.ca (Glen Gower)
Subject: {ERL WISHLIST: dates, voting
Message-Id: <7818e5$lh6$1@bertrand.ccs.carleton.ca>
Here's my Perl Wishlist. Two scripts:
1) A SSI script that delivers a line of html text depending on what
calendar day it is.
2) A voting program similar to the polls found on CNN, etc. (I found a
script called "surveysays.pl", but it doesn't seem to work no matter how I
configure it.)
Any suggestions?
----
Glen Gower (glengower@ottawa.com)
OTTAWASTART.COM: http://www.ottawastart.com
DIEFENBAKER WEB: http://diefenbaker.ottawa.com
OBSESSIVE FAN SITES: http://countingdown.com/fans
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 4685
**************************************