[13387] in Perl-Users-Digest
Perl-Users Digest, Issue: 797 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 14 19:07:33 1999
Date: Tue, 14 Sep 1999 16:05:16 -0700 (PDT)
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, 14 Sep 1999 Volume: 9 Number: 797
Today's topics:
Re: Active Perl on NT <cassell@mail.cor.epa.gov>
Re: Anyone know what "premature script header means"? <cassell@mail.cor.epa.gov>
can't install activeperl on nt <kangaruu@hotmail.com>
Re: CGI cannot open relative path <cassell@mail.cor.epa.gov>
Re: CGI from CGI without modules... (Kragen Sitaker)
Re: CGI Hosting? (Kragen Sitaker)
Re: challenge results <crdevilb@mtu.edu>
Re: challenge results (Matthew Bafford)
Re: challenge results (Jack Applin)
Re: challenge results (James Wetterau)
Re: challenge results (James Wetterau)
Date cgi script - no SSI dereksas@yahoo.com
Re: Date cgi script - no SSI (Abigail)
Re: Design Advice needed on Sending Data to Client caitlynhay@my-deja.com
Re: Design Advice needed on Sending Data to Client <flavell@mail.cern.ch>
Re: Forcing Variable interpolation of string read from <matthias.schwarze@wiesbaden.netsurf.de>
Re: Forcing Variable interpolation of string read from <tchrist@mox.perl.com>
Re: Generating an email with form entry (CGI) <gellyfish@gellyfish.com>
Re: Generating an email with form entry (CGI) (Kragen Sitaker)
Re: Help - Porting code from UNIX to NT <hm@garmisch.net>
Re: Is perl Safe? (Kragen Sitaker)
Newbe question on Substitution <prNOSPAMesutti@atitech.ca>
Re: Newbe question on Substitution (Martien Verbruggen)
Re: Newbe question on Substitution <crdevilb@mtu.edu>
Re: opening files/secure server (Martien Verbruggen)
Re: Pre-release Beta Testers <cassell@mail.cor.epa.gov>
Re: Pre-release Beta Testers (Larry Rosler)
Re: Redirect STDOUT to variable <makkulka@cisco.com>
running from telnet???? <perfectbeat@perfectbeat.com>
Re: running from telnet???? <dove@synopsys.com>
Re: syslog / linux <gellyfish@gellyfish.com>
Re: Usefulness of CGI.pm (Was Re: UNCRAP project propos <jeff@vpservices.com>
Re: Usefulness of CGI.pm (Was Re: UNCRAP project propos <jeff@vpservices.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 14 Sep 1999 14:22:50 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Active Perl on NT
Message-Id: <37DEBCAA.F9CECC08@mail.cor.epa.gov>
Not me wrote:
>
> Anyone using this version of Perl on NT? I cannot seem to get the
> permissions (or something) correct to allow scripts to create
> files/directories. I've set the Write permission for the web on IIS 4,
> and also edit the permissions on the directories that should be
> writable. I don't get any error or anything it just doesn't do it.
> Anyone have any experience with this?
Actually, a large number of people are using ActiveState's
Perl on win32 boxes. It's the 'official' version of Perl for
win32 now. But your problem is actually on webserver config,
rather than ActiveState Perl.
First, check out the docs which came with ActiveState Perl.
In the HTML docs which are on your NT Start Menu, you will
find the ActivePerl FAQ. It has a whole section on "Webserver
Config", including IIS 4.0 .
If those directions don't help you, then go to
http://www.activestate.com/support/mailing_lists.htm
and subscribe to the win32-perl-web list, where you can
ask perl-web-IIS questions.. or else read the archives of
that list, where the same question gets asked and answered
weekly.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 14 Sep 1999 14:13:36 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Anyone know what "premature script header means"?
Message-Id: <37DEBA80.D4FA9243@mail.cor.epa.gov>
Lisa Saari wrote:
>
> My scripts aren't going through and are instead coming back with a 500-Internal
> Server Error message. It does tell me that the script has "a premature script
> header". Can someone please respond ASAP!
Lisa, ASAP replies are not the strongpoint of Usenet. Please
don't count on getting a *correct* reply right away.
That said, the '500 Internal server Error' means that there
are about 500 different reasons why you might have gotten
that error message. :-) You'll have to use some method in
order to track down the specific cause or causes. It could be
anything from an error in your FTP transfer to a typo in your
script to a bad bit of HTML code to an error in webserver
configuration.
I recommend going to
http://language.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html
for Tom Christiansen's rudely-named-but-still-helpful
"Idiot's Guide to Solving Perl CGI Problems". Working through
this guide will not only help you, but will also teach you more
about how CGI works - and doesn't work.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 14 Sep 1999 21:27:22 GMT
From: <kangaruu@hotmail.com>
Subject: can't install activeperl on nt
Message-Id: <_4zD3.2274$Y6.268594@news1.telusplanet.net>
during extraction of the installshield exe, i gives an:
"unable to execute!" error, it can't seem to run:
"C:\TEMP\pft183~tmp\setup.exe" /SMS
PackageforTheWeb error, unable to execute the specified command line
aagh, any help?
thanks in advance.
------------------------------
Date: Tue, 14 Sep 1999 14:06:07 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: CGI cannot open relative path
Message-Id: <37DEB8BF.FF8C06FF@mail.cor.epa.gov>
JduPayrat wrote:
[snip of reply about absolute vs relative paths]
> I tried but it doesn't work. In fact, even if my cgi know its current
> directory (I've tested that), it doesn't accept
> any relative path to the open function.
Please don't do that. Relative paths can be made to work
some of the time in some webservers, but it is not a good idea.
Different webservers with different configurations assume
different 'home' directories belonging to different 'users'.
This makes any script using relative paths fairly fragile,
and without proper error-checking you may not know when your
script fails, or why.
Your problem may not even be the relative path, but the
ownership of the file or another problem. What error
message did you get when your open() failed?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 14 Sep 1999 21:24:04 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: CGI from CGI without modules...
Message-Id: <U1zD3.10969$N77.822825@typ11.nn.bcandid.com>
In article <Pine.NEB.3.96.990914150923.10768C-100000@www.yawp.com>,
<mike@yawp.com> wrote:
>> Thanks to everyone who answered my question about a CGI calling another
>> CGI, but is there a way to do this without having to get all those
>> modules?
>
>ouch.. statements like that sorta fly in the face of the Reuse Is Good
>mindset. try repeating 'Reuse Is Good' about 50,000 times, and you'll be
>in the right mindset to use modules religiously.
In March, I wrote a polemic called "Code Reuse Considered Harmful". I
don't think *all* reuse is harmful, but I think using prewritten code
just because it exists is often dangerous.
It can be retrieved from the mailing list archive by emailing
kragen-tol-get.66@kragen.dnaco.net.
It's one-sided, of course, because I think the (many, good) arguments
for reusing code have been amply aired. :)
> - you find out whether the module is worth using at all. just because
>10,000 worshippers have learned the API doesn't mean the internals aren't
>crap. i happen to take an heretical view toward CGI.pm for reasons
>vaguely along those lines.
. . . evidently you think so too :)
Have you written a replacement CGI.pm? Presumably you don't split /&/
in every CGI script you write.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Sep 14 1999
55 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 14 Sep 1999 21:15:17 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: CGI Hosting?
Message-Id: <FVyD3.10957$N77.821743@typ11.nn.bcandid.com>
In article <7rm2te$e4d$1@news.news-service.com>,
_mDe_ <exagone@starlynx.com> wrote:
>Is there a free webspace provider with cgi support without all the banners
>and popups?
This is off-topic for comp.lang.perl.misc.
Kragen
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Sep 14 1999
55 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 14 Sep 1999 21:22:55 GMT
From: Colin R. DeVilbiss <crdevilb@mtu.edu>
Subject: Re: challenge results
Message-Id: <7rmebf$4ac$1@campus1.mtu.edu>
Matthew Bafford <*@dragons.duesouth.net> wrote:
> perl -pe 'BEGIN{$/=\1}$_=rand>.5?uc:lc'
> works but consumes more space...
perl -pe'$/=\1;$_=rand>.5?uc:lc'
is less elegant, but pretty darn short.
Colin DeVilbiss
crdevilb@mtu.edu
------------------------------
Date: Tue, 14 Sep 1999 22:11:28 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: challenge results
Message-Id: <slrn7ttgbb.38u.*@dragons.duesouth.net>
On 14 Sep 1999 21:22:55 GMT, Colin R. DeVilbiss <crdevilb@mtu.edu>
spewed forth:
: Matthew Bafford <*@dragons.duesouth.net> wrote:
: > perl -pe 'BEGIN{$/=\1}$_=rand>.5?uc:lc'
: perl -pe ' $/=\1;$_=rand>.5?uc:lc'
: is less elegant, but pretty darn short.
It may be elegant, but it doesn't work. :-)
bash$ (echo This is a long line 1; echo This is line 2) | \
> perl -pe'$/=\1;$_=rand>.5?uc:lc'
THIS IS A LONG LINE 1
THIs Is lINE 2
bash$ (echo This is a long line 1; echo This is line 2) | \
> perl -pe'$/=\1;$_=rand>.5?uc:lc'
this is a long line 1
tHiS is lINe 2
bash$
Remember, your code really is equivalent to:
while(<>) {
$/ = \1;
$_ = rand > .5 ? uc : lc;
} continue {
print;
}
while mine is equivalent to:
$/ = \1;
while(<>) {
$_ = rand > .5 ? uc : lc;
} continue {
print;
}
HTH,
: Colin DeVilbiss
--Matthew
------------------------------
Date: 14 Sep 1999 22:07:08 GMT
From: neutron@fc.hp.com (Jack Applin)
Subject: Re: challenge results
Message-Id: <7rmguc$3fi$1@fcnews.fc.hp.com>
Colin R. DeVilbiss (crdevilb@mtu.edu) wrote:
> perl -pe'$/=\1;$_=rand>.5?uc:lc'
> is less elegant, but pretty darn short.
Alas, it doesn't work. The first line is read in before the assignment to $/,
so the entire first line is in $_ the first time. This means that all of the
first line of output is either uppercase, or lowercase, but it's not mixed.
$ echo hello | perl -pe'$/=\1;$_=rand>.5?uc:lc'
hello
$ echo hello | perl -pe'$/=\1;$_=rand>.5?uc:lc'
HELLO
$ echo hello | perl -pe'$/=\1;$_=rand>.5?uc:lc'
HELLO
-Jack Applin
neutron@fc.hp.com
------------------------------
Date: 14 Sep 1999 18:48:22 -0400
From: jwjr@panix.com (James Wetterau)
Subject: Re: challenge results
Message-Id: <7rmjbm$ssm$1@panix.com>
In article <37DE7E5D.1C172E3E@wins.uva.nl>,
Steven de Rooij <srooij@wins.uva.nl> wrote:
>The following gem is the result of the joint efforts of Abigail,
>Steven Alexander, David Alan Black, Gareth Rees and me:
>
>(Everything on a new line:)
>perl -ne'$x{join"",sort split//}.=$_}{/.\n./&&print for%x'
>
>(All anagrams on one line:)
>perl -lne'$x{join"",sort split//}.="$_ "}{/ ./&&print for%x'
>
>If anyone knows how to squeeze another byte out of this I will start
>uttering strange sounds.
s#/./g#split//#
Three bytes, I think.
--
James Wetterau, Jr. jwjr@panix.com (h) jwjr@name.net (w)
"I don't care about America, I don't care about democracy, I don't care about
the human race. And I don't care about religion or God or any of those things.
I care about friendship, family ties and romantic love." - George Carlin
------------------------------
Date: 14 Sep 1999 18:51:48 -0400
From: jwjr@panix.com (James Wetterau)
Subject: Re: challenge results
Message-Id: <7rmji4$t8h$1@panix.com>
In article <7rmjbm$ssm$1@panix.com>, James Wetterau <jwjr@panix.com>
blundered:
>In article <37DE7E5D.1C172E3E@wins.uva.nl>,
>Steven de Rooij <srooij@wins.uva.nl> wrote:
....
>>perl -lne'$x{join"",sort split//}.="$_ "}{/ ./&&print for%x'
>>
>>If anyone knows how to squeeze another byte out of this I will start
>>uttering strange sounds.
>
>s#/./g#split//#
Exactly backwards of course. In plain old English:
--
James Wetterau, Jr. jwjr@panix.com (h) jwjr@name.net (w)
"I don't care about America, I don't care about democracy, I don't care about
the human race. And I don't care about religion or God or any of those things.
I care about friendship, family ties and romantic love." - George Carlin
------------------------------
Date: Tue, 14 Sep 1999 21:27:03 GMT
From: dereksas@yahoo.com
Subject: Date cgi script - no SSI
Message-Id: <37debd14.8900249@news.rivernet.net>
I need a cgi script that will display the date in text format on a
html page, but that doesn't require SSI. Anyone know where to find
one? Thanks.
Derek
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 14 Sep 1999 17:16:10 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Date cgi script - no SSI
Message-Id: <slrn7ttieb.gcd.abigail@alexandra.delanet.com>
dereksas@yahoo.com (dereksas@yahoo.com) wrote on MMCCV September MCMXCIII
in <URL:news:37debd14.8900249@news.rivernet.net>:
"" I need a cgi script that will display the date in text format on a
"" html page, but that doesn't require SSI. Anyone know where to find
"" one? Thanks.
#!/opt/perl/bin/perl -wT
use strict;
print <<HTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head><title>The current date</title></head>
<body><h1>The current date</h1>
<p>The current date is: ${\localtime}
</body></html>
HTML
__END__
HTH. HAND.
Abigail
--
split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 14 Sep 1999 22:03:05 GMT
From: caitlynhay@my-deja.com
Subject: Re: Design Advice needed on Sending Data to Client
Message-Id: <7rmgmk$6k6$1@nnrp1.deja.com>
My impression is that a response is consists of a response header, and
a response body.
For e.g, when a browser request for a html page from a server. The
server returns the reponse header which consists of the content type,
content length, etc. Whereas, the response body contains the html of
the requested page. Or, am I totaly off track?
Is there any way to view the response header in a web browser? I just
want to isolate whether it's a problem with the client or the server.
TIA
cait
In article <3yuD3.10269$N77.788462@typ11.nn.bcandid.com>,
kragen@dnaco.net (Kragen Sitaker) wrote:
> In article <7rlo6s$lf0$1@nnrp1.deja.com>, <caitlynhay@my-deja.com>
wrote:
> >I've simulated a client (Windows based) to test
> >the server program. Everything works fine except
> >that I'm unable to query the header info.
> >
> >Is there any special header that I suppose to set
> >at the client or the server side in order to get the response header?
>
> I don't understand your question.
>
> What headers are you trying to read? Are they not being sent to the
> client? If they are not being sent to the client, in what sense do
> they exist at all?
>
> Kragen
> --
> <kragen@pobox.com> Kragen Sitaker
<http://www.pobox.com/~kragen/>
> Tue Sep 14 1999
> 55 days until the Internet stock bubble bursts on Monday, 1999-11-08.
> <URL:http://www.pobox.com/~kragen/bubble.html>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 15 Sep 1999 00:23:49 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Design Advice needed on Sending Data to Client
Message-Id: <Pine.HPP.3.95a.990915002031.21653A-100000@hpplus03.cern.ch>
On Tue, 14 Sep 1999 caitlynhay@my-deja.com stood usenet on its head
with:
> My impression is that a response is consists of a response header, and
> a response body.
Not necessarily. Some status responses forbid there to be a response
body.
> Is there any way to view the response header in a web browser?
Of course. And your Perl language question is...?
> I just
> want to isolate whether it's a problem with the client or the server.
That's the right way to do it!
good luck. [pick your own f'up]
------------------------------
Date: Tue, 14 Sep 1999 23:28:14 +0200
From: Matthias Schwarze <matthias.schwarze@wiesbaden.netsurf.de>
To: Ronald Dicke <rdicke@wirespeednetworks.com>
Subject: Re: Forcing Variable interpolation of string read from a file - How?
Message-Id: <37DEBDEE.8565DA89@wiesbaden.netsurf.de>
Hi!
I don't think that the direct interpolation (if possible at all?!) is
advisable.
A possible solution for your problem is substitution like in the
following
snippet:
----8<---- bite here ------
$today = 'Genius';
# Loaded form file in your example
$_ = 'Have a nice day, $name';
s/\$name/$today/g;
print;
-------------------->8------
Just don't forget the backslash in front of $name!
Bye - Matthias
------------------------------
Date: 14 Sep 1999 15:49:58 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Forcing Variable interpolation of string read from a file - How?
Message-Id: <37dec306@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
matthias.schwarze@wiesbaden.netsurf.de writes:
:I don't think that the direct interpolation (if possible at all?!) is
:advisable.
What I want to understand is why this question *NEVER* comes up amongst
C programmers, but the Perl neophytes seem to ask it as often as rises
the sun. Perhaps it's some issue of mismatched mental models.
--tom
--
A factor of 3000 is actually significant --Andrew Hume
------------------------------
Date: 14 Sep 1999 21:01:19 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Generating an email with form entry (CGI)
Message-Id: <7rmd2v$67d$1@gellyfish.btinternet.com>
On Tue, 14 Sep 1999 07:23:44 +0100 JGM wrote:
> Hi all,
>
> I have a form which feeds into a .csv file. What I want though, is an email
> to be generated when the form is submitted ie. to alert relevant people that
> a new entry has been made.
>
> I used net::smtp to test the email and it works fine from the command
> prompt, but I can't translate that success to the web page.
>
> I am running ActivePerl on a NT4 server with IIS3.
>
The user that the HTTP server service runs as does not by default have
permission to access the network - you will need to alter the users rights
however you will want to ask in a newsgroup that is interested in these
matters if you are unsure of how to go about this.
/j\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Tue, 14 Sep 1999 21:11:09 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Generating an email with form entry (CGI)
Message-Id: <NRyD3.10952$N77.821205@typ11.nn.bcandid.com>
In article <C4yD3.95$cm.3905@wards>, James <jgmtest@serviceteam.ltd.uk> wrote:
>When
>they seem OK I rename them to .plx files and then they work (all bar this
>one) when called from a web page.
So presumably this script is actually *running*; it just doesn't do
what it's supposed to. (Is there some way to verify this presumption?
Can you have the script create a file somewhere, or something similar,
so you can see if it actually runs at all?)
Once you've verified that it's actually running, find its error
output. If you can't find it yet, create some error output (warn "Hi
mom!") and see if you can find it.
Once you find it, let us know what the error message -- or lack thereof
-- is. Also, see if you can find the error message in perldoc
perldiag.
HTH.
Kragen
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Sep 14 1999
55 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 14 Sep 1999 23:27:20 +0200
From: Heiko Marschall <hm@garmisch.net>
Subject: Re: Help - Porting code from UNIX to NT
Message-Id: <37DEBDB8.CA7F2EE2@garmisch.net>
NT doesn´t use the first line for getting the executing compiler.
So you can delete the first line. The problem is that you have to name
the extension of the script
with ".pl" - because NT knows which compiler to use from the file
extension !
Heiko
Jon Hall schrieb:
>
> Our company has just changes ISPs and now I've got to port our basic little
> PERL scripts to cope with the new environment.
>
> Unfortunatley I've not done much in the way of PERL and NT so I'm running
> into pitfalls.
>
> Here's a snippet:-
>
> #!c:\perl\bin\perl.exe
> print "Location: http://www.oursite.com/index.html\n\n";
> exit;
>
> When I run this I receive "HTTP/1.0 500 Server Error (/scripts/redir.cgi is
> not a valid Windows NT application. )"
>
> The ISP tells me the directory is set as executable - have I overlooked
> something blatant??
>
> Thanks for your help,
>
> Jon
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
--
| Dipl.Phys. Heiko B. Marschall - Geschaeftsleitung
| Marschall Electronics GmbH & Co.KG
| http://www.garmisch.net mailto:hm@garmisch.net
| Phone: +49 8821 943910-0 Fax: +49 8821 943910-99
|
| "There is a theory which states that if ever anyone discovers
| exactly what the Universe is for and why it is here, it will
| instantly disappear and be replaced by something even more
| bizarre and inexplicable." (Douglas Adams)
------------------------------
Date: Tue, 14 Sep 1999 21:29:26 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Is perl Safe?
Message-Id: <W6zD3.10977$N77.823828@typ11.nn.bcandid.com>
In article <37DEB4CA.92471ED9@mail.cor.epa.gov>,
David Cassell <cassell@mail.cor.epa.gov> wrote:
>Ouch. Would you rather I used "{}" as my quoting signifier
>so that - like Abigail - I could rack up impressive OCR scores
>in Greg Bacon's lists? :-)
Heh. :)
I have a bit of trouble telling when Abigail is quoting sometimes. I'm
sure sufficiently-smart newsmunging software could force Abigail to
make his posts almost completely indecipherable by humans in order to
fool the software.
>I was certainly off-topic, but I couldn't resist it when I saw
>TomC's reply. Even though I knew what he meant. But when I saw
>his quote from "2001 - A Space Odyssey" at the bottom, I just
>had to comment on that too. So my 'quote' there was really a
>reply also.
You weren't half as off-topic as I was, though. Your post was really
just an excuse for me to complain about some things that had bothered
me for a while.
>I guess now you're sorry you welcomed me back to the ng. :-)
I welcomed you back after I flamed you, actually. I started feeling a
little foolish for having flamed you; you didn't really deserve it.
>Sorry to ruin your day. I'm not always so OT. I'm usually
>one of the ones bugging people for doing this stuff.
You didn't ruin my day. Sorry to take it out on you.
Kragen
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Sep 14 1999
55 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 14 Sep 1999 22:34:25 GMT
From: "Mike" <prNOSPAMesutti@atitech.ca>
Subject: Newbe question on Substitution
Message-Id: <R3AD3.14$Em1.109076@bunson.tor.sfl.net>
Hello!
I'm trying to figure out why this works:
$test = "Test string with path= c:/path/sub1/sub2/file.exe";
$lookfor = "c:/path/sub1/sub2";
$subwith = "c:/testpath";
$test=~s/$lookfor/$subwith/;
print $test;
which outputs: Test string with path= c:/testpath/file.exe.
and this doesn't:
$test = "Test string with path= c:\\path\\sub1\\sub2\\file.exe";
$lookfor = "c:\\path\\sub1\\sub2";
$subwith = "c:\\testpath";
$test=~s/$lookfor/$subwith/;
print $test;
which outputs: Test string with path= c:\path\sub1\sub2\file.exe
I'm using ActiveStates 516e distribution on a Win9x machine. Is there
something about double backslashes that the substitution expression doesn't
like?
Thanks
Mike.
------------------------------
Date: Tue, 14 Sep 1999 22:43:06 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Newbe question on Substitution
Message-Id: <_bAD3.38$LN1.3309@nsw.nnrp.telstra.net>
In article <R3AD3.14$Em1.109076@bunson.tor.sfl.net>,
"Mike" <prNOSPAMesutti@atitech.ca> writes:
> and this doesn't:
> $lookfor = "c:\\path\\sub1\\sub2";
> $subwith = "c:\\testpath";
> $test=~s/$lookfor/$subwith/;
But this does:
$test=~s/\Q$lookfor/$subwith/;
Backslashes are special in regular expressions as well as in double
quoted strings. The \Q escape will prevent any of the characters on
$lookfor to be treated as special.
# perldoc perlre
Martien
--
Martien Verbruggen |
Interactive Media Division | The gene pool could use a little
Commercial Dynamics Pty. Ltd. | chlorine.
NSW, Australia |
------------------------------
Date: 14 Sep 1999 22:45:05 GMT
From: Colin R. DeVilbiss <crdevilb@mtu.edu>
Subject: Re: Newbe question on Substitution
Message-Id: <7rmj5h$dni$1@campus1.mtu.edu>
Mike <prNOSPAMesutti@atitech.ca> wrote:
> Hello!
> $test = "Test string with path= c:\\path\\sub1\\sub2\\file.exe";
> $lookfor = "c:\\path\\sub1\\sub2";
> $subwith = "c:\\testpath";
> $test=~s/$lookfor/$subwith/;
> print $test;
> which outputs: Test string with path= c:\path\sub1\sub2\file.exe
this is because the search pattern $lookfor (which is now the literal
'c:\path\sub1\sub2'
) has its backslashes interpolated once by the s/// operator. to see
how to circumvent this, look at the documentation for quotemeta.
perldoc -f quotemeta
perldoc perlre
(note \Q escape)
Colin DeVilbiss
------------------------------
Date: Tue, 14 Sep 1999 23:03:39 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: opening files/secure server
Message-Id: <fvAD3.51$LN1.3801@nsw.nnrp.telstra.net>
In article <37D55127.AD63C6AC@cris.com>,
Perfect Beat <prfctbt@cris.com> writes:
> I am having a problem opening files for writing from a secure server.
Huh? This makes no sense...
> The process works fine while in non secure mode using relative paths. I
> have tried to use absolute http and https paths but am not having any
What? http and https paths? What are those things?
> luck. Does anyone have some insight?
Lets try to do some ESP here... Are you trying to write a CGI program
in perl which you want to run from a web server or from two web
servers? Does one of the ways of talking to these web servers use a
http and the other a 'secure' http protocol?
If the above is true: WHAT exactly is the problem (and pelase
accompany this with a _few_ lines o code that show the problem). What
do you expect to happen, and what happens? What are the error
messages?
And... Have you read the manual of your web serters? When it listens
for https requests, it may just try to be more secure in the way it
runs. Maybe it does a chroot or something like that. So, if you want
to find that out, you go to comp.infosystems.www.* and ask in one of
the server groups (the most appropriate) what happens here. I have the
feeling that if the same program runs from one server, but not from
the other, that the problem is not a perl (i.e. programming) problem,
but rather a behavioural difference between the ways these servers
run. Once again: check the newsgroups that talk about web servers.
Martien
--
Martien Verbruggen |
Interactive Media Division | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd. | you come to the end; then stop.
NSW, Australia |
------------------------------
Date: Tue, 14 Sep 1999 14:16:15 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Pre-release Beta Testers
Message-Id: <37DEBB1F.2694079C@mail.cor.epa.gov>
RecruitSource wrote:
>
> Our company, http://www.recruitsource.com, is looking for people to
> beta-test an online technical testing system, which will soon be released to
> the public. Specifically, we need people of various skill levels to take
> one or more timed, multiple-choice exams, and to comment on/criticize the
> exam as a whole, as well as on individual questions.
<Mister Rogers>
"Can you say TekMetrics? There. I knew you could."
</Mister Rogers>
> If you would like to partake, please reply and we will set you up with an
> account.
Will Larry R get another "Certified Perl Pornographer" paper?
Will they really take the advice of Perl experts on their
certification methods?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 14 Sep 1999 15:14:55 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Pre-release Beta Testers
Message-Id: <MPG.124868b67b8f5a70989f63@nntp.hpl.hp.com>
In article <37DEBB1F.2694079C@mail.cor.epa.gov> on Tue, 14 Sep 1999
14:16:15 -0700, David Cassell <cassell@mail.cor.epa.gov> says...
...
> Will Larry R get another "Certified Perl Pornographer" paper?
That's "Certifiable Perl Pornographer", and I bought it from mjd at Perl
Conference 2.0. What I got from Tekmetrics was "Master Perl
Programmer". I value the former certificate far more highly.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 14 Sep 1999 14:07:10 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Redirect STDOUT to variable
Message-Id: <37DEB8FE.5ECE505E@cisco.com>
[ bernfarr@my-deja.com wrote:
>
> Does anyone have a way to do this? I've searched for redirect and
> STDOUT, etc., in the normal forums without any success.
Do it yourself. It is easy. Concatenate all HTML output to a string
variable.
use CGI ;
my $page=new CGI ;
my $string = "";
print $page->header();
$string.=$page->start_html();
$string.=$page->end_html();
print $string ; # print entire HTML when </HTML> tag is written to $string.
==
------------------------------
Date: Tue, 14 Sep 1999 15:23:06 +0000
From: "Perfect Beat" <perfectbeat@perfectbeat.com>
Subject: running from telnet????
Message-Id: <tQzD3.74$ea5.14887@typhoon-la.pbi.net>
I just switched servers and am supposed to be the administrator on our new
dedicated server.
In the past, I have been able to run CGI/perl programs from telnet and
recieve error reports. Now, I just get a bash: command not found.
Do I have to do something in Linux or Apache to run from the telnet command
prompt????
Anthony
------------------------------
Date: Tue, 14 Sep 1999 15:55:14 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: running from telnet????
Message-Id: <37DED252.50C3A50D@synopsys.com>
Hi Antony,
Perfect Beat wrote:
> In the past, I have been able to run CGI/perl programs from telnet and
> recieve error reports. Now, I just get a bash: command not found.
>
> Do I have to do something in Linux or Apache to run from the telnet command
> prompt????
>
Try putting a ./ in front of your cgi-script. For example,
% ./my-script.cgi
If that doesn't work, make sure that the path in the top of your cgi scripts
for your perl is correct.
Hope this helps,
-=dav
>
> Anthony
------------------------------
Date: 14 Sep 1999 20:57:01 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: syslog / linux
Message-Id: <7rmcqt$677$1@gellyfish.btinternet.com>
On 14 Sep 1999 09:36:54 -0700 Russ Allbery wrote:
> Benjamin Schweizer <SternSZ@gmx.de> writes:
>
>> I´ve written a little daemon and I want to save messages (stdout) to the
>> syslog daemon. Is there a function in perl or is this done by the os?
>
> Another way is to use a program that already does that, such as splogger
> from the qmail distribution.
Certainly the distribution of Linux I am using (SuSE) includes 'logger'
from 4.3 BSD (or a replica thereof).
>
> A third way is to modify your Perl program to write its messages to syslog
> (using Sys::Syslog) rather than to stdout.
>
There are some caveats with this on certain OS - the original poster
would be advised to search Dejanews for Sys::Syslog for a fuller discussion.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 14 Sep 1999 20:57:45 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Usefulness of CGI.pm (Was Re: UNCRAP project proposal)
Message-Id: <37DEB5C4.DEC26EA1@vpservices.com>
Uri Guttman wrote:
>
> >>>>> "JZ" == Jeff Zucker <jeff@vpservices.com> writes:
> so how do you make sure you don't overwrite some of CGI's values
> in the object?
>
> JZ> i.e. the next time Lincoln adds some parameters to one of these
> JZ> methods, they can instantly be used in my new object because my
> JZ> object inherits all the methods of the CGI.pm object. I just
> JZ> install the new version of CGI.pm and start using the new
> JZ> parameters without having to touch my method that does the
> JZ> overriding.
>
> as i said above, if he changes the object to overlap with your new member
> names, you will have a nice bug to solve. you have to work on data
> encapsulation to make sure this won't happen.
Aw, you are just trying to scare me into buying Damian's book. Don't
worry, already on order.
So, my feeble attempt at avoiding the problem you mention is this: a) I
only use public methods of CGI.pm, do not call on any internals b) I do
not create any new data members c) I do not create any new methods
(other than redefining existing CGI.pm methods).
--
Jeff
------------------------------
Date: 14 Sep 1999 20:57:55 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Usefulness of CGI.pm (Was Re: UNCRAP project proposal)
Message-Id: <37DEB5D3.C0F872C2@vpservices.com>
Chris Nandor wrote:
>
> [examples of me using CGI.pm objects]
>
> You can do the exact same thing with popup_menu() the function instead of
> popup_menu() the object method, though.
>
Ok, you got me. $me->confesses( q/I just like the pretty arrows in my
code./ );
Seriously, though, it seems to me that I can do worse than attempting to
use the object interface and gradually, through discussions such as this
one, figure out ways in which I am not yet using real OOP.
--
Jeff
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 797
*************************************