[12858] in Perl-Users-Digest
Perl-Users Digest, Issue: 268 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 27 05:07:18 1999
Date: Tue, 27 Jul 1999 02:05:10 -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, 27 Jul 1999 Volume: 9 Number: 268
Today's topics:
Re: Beginner-friendly group as cultural adaptation? <jbc@shell2.la.best.com>
business graphics with perl <jriera@retemail.es>
Re: Can anyone explain concepts of Perl Objects? (Anno Siegel)
Geekspeak Programming Contest (Anno Siegel)
Re: Geekspeak Programming Contest (Anno Siegel)
High demand for Perl programmers? (Xevious)
Re: How to dereference an array reference? (Andreas Fehr)
InoculateIT detected the (Win95.Spanska_Happy99) virus InoculateIT
InoculateIT detected the (Win95.Spanska_Happy99) virus InoculateIT
InoculateIT detected the (Win95.Spanska_Happy99) virus InoculateIT
InoculateIT detected the (Win95.Spanska_Happy99) virus InoculateIT
InoculateIT detected the (Win95.Spanska_Happy99) virus InoculateIT
Re: Install MSQL Module into Perl (Layout/Design)
Re: Newbie needs help: Environment variables <massea@yahoooo.com>
Open and Pipes adougall@netscape.net
Orwant book status? (was Re: stopping email) <jbc@shell2.la.best.com>
Re: Outputting text as entered by user (Andreas Fehr)
Pass by value or pass by reference? <c8133594@comp.polyu.edu.hk>
Re: Perl in webpages (Anno Siegel)
Re: perl to interpret a XLS file? <sklivvz@tiscalinet.it>
Problem making libraries <pavel@asei.cz>
Re: Problem making libraries (elephant)
Re: Problem with sockets (Anno Siegel)
Re: Problem with sockets (Tommi Niemi)
Re: Server 500 error? frank_hampshire@my-deja.com
Re: Server 500 error? (Juho Cederstrom)
Re: Server NT et Perl (Martin Vorlaender)
Re: sort database and remove duplicates (Larry Rosler)
Re: Special problem (Networking) specker@gandalf.rz.uni-frankfurt.de
Re: Special problem (Networking) specker@gandalf.rz.uni-frankfurt.de
Re: special problem frank_hampshire@my-deja.com
Re: SSI command in Perl script problem <steven@*REMOVE*filipowicz.com>
Re: Win32::EventLog (Anno Siegel)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 27 Jul 1999 07:02:25 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <379d5981$0$202@nntp1.ba.best.com>
Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
> But if you really want discussion, why not post a formal RFD?
Because I don't want to propose it badly, and have it fail due to my
ineptitude, rather than failing on its own merits (or lack thereof). As
I said before, I also don't want to waste everyone's energy (my own
included) if there really is no chance of it succeeding.
I'm curious why people think no one who knows anything will answer
newbie questions in a newbie group. People answer newbies now. There
are tons of great followups to newbie questions. I would assume those
same people would be equally motivated to followup to newbie questions
in a separate group. But it would shock me if the people who make fun
of the newbie posts would bother to follow them there.
I realize that newbies are still going to stumble in here, and get
their hair parted. I don't expect that to change. I find myself
increasingly depressed by it, though, which is actually kind of odd,
considering how I used to find it so entertaining. I suppose that must
be related to the aging process somehow.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: Mon, 26 Jul 1999 07:41:39 +0200
From: "Juan Riera" <jriera@retemail.es>
Subject: business graphics with perl
Message-Id: <7njhgq$3ll1@SGI3651ef0>
Hello,
I am looking for some ressources about creating database-based dynamic
business graphics with perl.
Any reference will be greatly appreciated.
Thanks in advance,
Juan
------------------------------
Date: 27 Jul 1999 08:30:05 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Can anyone explain concepts of Perl Objects?
Message-Id: <7njqmd$8qe$1@lublin.zrz.tu-berlin.de>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
>Damian Conway <damian@cs.monash.edu.au> wrote in comp.lang.perl.misc:
>
>>There's also an explanation of the basics of OO Perl at:
>>
>> http://www.manning.com/Conway/Cyberdigest.html
>
>Taking a look at the site, I found
>
>
>
> Object Oriented Perl
> Damian Conway
>
> Foreward by Randal L. Schwartz
>
>
>Damian! Randal! Sic'em!
I apologize to everyone who thinks this is in bad taste.
Anno
------------------------------
Date: 27 Jul 1999 08:12:11 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Geekspeak Programming Contest
Message-Id: <7njpkr$8nu$1@lublin.zrz.tu-berlin.de>
Keith G. Murphy <keithmur@mindspring.com> wrote in comp.lang.perl.misc:
>Anno Siegel wrote:
>>
>[cut]
>> Conceptually, I'd say a programming mistake is an error in
>> algorithm, i.e. applying an algorithm that doesn't solve the
>> problem at hand.
>>
>> A bug is an error in implementation, i.e. using an algorithm
>> that would solve the problem, but failing to implement it
>> correctly.
>>
>> Of course, this distinction is of little empirical value, because
>> it depends on the programmers state of mind, absent additional
>> evidence. Seeing the line
>>
>> $sum_of_squares = $n*( $n - 1);
This should have been $sum_of_integers = ..., as Larry has pointed
out.
>> we don't know if the programmer misremembered his math (programming
>> error) or if he forgot to type in /2 (bug).
>>
>> Anno
>So the continuum runs like this?
>
>programming mistake ----> bug ------> typo
> AKA
> "brain fart"
No. Typos are a frequent cause of bugs, but the result is a bug
nonetheless.
>Then very few of the Y2K "bugs" actually qualify: they're either
>programming mistakes, or there by (shortsighted) design.
That was Tom's original point. Welcome to the thread.
Anno
------------------------------
Date: 27 Jul 1999 07:58:44 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Geekspeak Programming Contest
Message-Id: <7njork$8kq$1@lublin.zrz.tu-berlin.de>
Larry Rosler <lr@hpl.hp.com> wrote in comp.lang.perl.misc:
>In article <7nh3cp$6v4$1@lublin.zrz.tu-berlin.de> on 26 Jul 1999
>07:40:09 -0000, Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> says...
>> Larry Rosler <lr@hpl.hp.com> wrote in comp.lang.perl.misc:
>> >[Posted and a courtesy copy sent.]
>...
>> >How would one characterize the difference between a 'programming
>> >mistake' and a (software) bug?
>...
>> $sum_of_squares = $n*( $n - 1);
>>
>> we don't know if the programmer misremembered his math (programming
>> error) or if he forgot to type in /2 (bug).
>
>Then how would one characterize this:
>
> $sum_of_squares = $n*( $n - 1) / 2;
>
>versus this:
>
> $sum_of_sequence_of_first_n_nonnegative_integers =
> $n*( $n - 1) / 2;
Sloppy posting, I guess. You are so right and I am so sorry.
Anno
------------------------------
Date: Tue, 27 Jul 1999 07:26:39 GMT
From: Xevious@Galaxy.com (Xevious)
Subject: High demand for Perl programmers?
Message-Id: <379f5df5.51234763@news.giganews.com>
Is there a shortage of Perl programmers? It seems that a lot of the
perl job ads have an air of desperation about them. On the other hand,
a lot of the job ads for webmasters/designers are very demanding, I
guess because anyone can put together a basic web site, so they can
afford to pick and choose in that area.
------------------------------
Date: Tue, 27 Jul 1999 05:48:01 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: How to dereference an array reference?
Message-Id: <379d46c2.1341398@news.uniplus.ch>
On 25 Jul 1999 23:23:35 +0200, Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai
Großjohann) wrote:
>backwards.saerdna@srm.hc (Andreas Fehr) writes:
>
>> Yes, filtering spam is easy, but here in Europe, most private
>> people have a modem dialup connection to the internet and no
>> flat rate to connect there. So loading all the spam to your
>> computer takes some time and money.
>
>The TV broadcasting stations are wasting my money! They broadcast
>commercials, and *I* have to pay the electricity bill!
Yes, yes apples and pears. And I bet, you have to pay for the
production cost of the commercials too.
>Let's start a compaign against the TV broadcasting stations wasting
>our precious money!
Sell your TV.
Andreas
------------------------------
Date: Tue, 27 Jul 1999 07:11:54 +0200
From: InoculateIT
Subject: InoculateIT detected the (Win95.Spanska_Happy99) virus in Mailbox (Public Folders), Sender (cnlsilva@gte.net (Chris)) !!!
Message-Id: <38DB2D6FC9C4D211904D00105AD009E849FA62@exchange.do.prodv.de>
The (Win95.Spanska_Happy99) virus was detected in (Public
Folders\Happy99.exe) and was sent by (cnlsilva@gte.net (Chris)). Action:
(No Action.).
------------------------------
Date: Tue, 27 Jul 1999 07:14:41 +0200
From: InoculateIT
Subject: InoculateIT detected the (Win95.Spanska_Happy99) virus in Mailbox (Public Folders), Sender (cnlsilva@gte.net (Chris)) !!!
Message-Id: <38DB2D6FC9C4D211904D00105AD009E849FA7A@exchange.do.prodv.de>
The (Win95.Spanska_Happy99) virus was detected in (Public
Folders\Happy99.exe) and was sent by (cnlsilva@gte.net (Chris)). Action:
(No Action.).
------------------------------
Date: Tue, 27 Jul 1999 07:12:55 +0200
From: InoculateIT
Subject: InoculateIT detected the (Win95.Spanska_Happy99) virus in Mailbox (Public Folders), Sender (cnlsilva@gte.net (Chris)) !!!
Message-Id: <38DB2D6FC9C4D211904D00105AD009E849FA69@exchange.do.prodv.de>
The (Win95.Spanska_Happy99) virus was detected in (Public
Folders\Happy99.exe) and was sent by (cnlsilva@gte.net (Chris)). Action:
(No Action.).
------------------------------
Date: Tue, 27 Jul 1999 07:14:45 +0200
From: InoculateIT
Subject: InoculateIT detected the (Win95.Spanska_Happy99) virus in Mailbox (Public Folders), Sender (cnlsilva@gte.net (Chris)) !!!
Message-Id: <38DB2D6FC9C4D211904D00105AD009E849FA81@exchange.do.prodv.de>
The (Win95.Spanska_Happy99) virus was detected in (Public
Folders\Happy99.exe) and was sent by (cnlsilva@gte.net (Chris)). Action:
(No Action.).
------------------------------
Date: Tue, 27 Jul 1999 07:16:52 +0200
From: InoculateIT
Subject: InoculateIT detected the (Win95.Spanska_Happy99) virus in Mailbox (Public Folders), Sender (cnlsilva@gte.net (Chris)) !!!
Message-Id: <38DB2D6FC9C4D211904D00105AD009E849FA9D@exchange.do.prodv.de>
The (Win95.Spanska_Happy99) virus was detected in (Public
Folders\Happy99.exe) and was sent by (cnlsilva@gte.net (Chris)). Action:
(No Action.).
------------------------------
Date: Tue, 27 Jul 1999 09:02:29 +0100
From: "Paul Foran (Layout/Design)" <Paul.Foran@analog.com>
Subject: Re: Install MSQL Module into Perl
Message-Id: <379D6795.B8FF4080@analog.com>
> perl -wlne '}for($.){print' file # Count the number of lines.
Do I do this from the PPM or from the dos prompt within c:\perl\pin (path to
perl.exe)??
Where is the reference to installing MSQL module into perl??
------------------------------
Date: Tue, 27 Jul 1999 10:46:29 +0000
From: Masse <massea@yahoooo.com>
Subject: Re: Newbie needs help: Environment variables
Message-Id: <379D8E04.FC80541B@yahoooo.com>
Doesn't
$ENV{variable_name} = $value;
work?
------------------------------
Date: Tue, 27 Jul 1999 08:54:12 GMT
From: adougall@netscape.net
Subject: Open and Pipes
Message-Id: <7njs3i$r2h$1@nnrp1.deja.com>
Hi,
In the following bits of code, my modified version of Register 1.2
fails. My problem is that I am not sure what it does. Can someone
explain it to me?
Thanks in advance,
Alasdair
# These variables point to the password file and the htpasswd.pl file
$passfile ="../recipes/password"; #must be read/writable
$htpasswd ="htpasswd.pl";
# Call htpasswd.pl and encrypt the password then enter username and
# password into passfile
# What is this doing? How does it write to the password file?
open(HTPASSWD, "|$htpasswd $passfile $contents{'username'} >/dev/null
2>&1");
print HTPASSWD "$contents{'password'}\n";
close(HTPASSWD);
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 27 Jul 1999 07:08:34 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Orwant book status? (was Re: stopping email)
Message-Id: <379d5af2$0$202@nntp1.ba.best.com>
I R A Darth Aggie <fl_aggie@thepentagon.com> wrote:
> Maybe we could have a bake sale and buy the kid a copy of Knuth's
> Algorithms book? ok, maybe we could have a bake say so *I* can buy a
> copy of all 3 of Knuth's books...
Speaking of algorithm books, does anyone know the status of Jon
Orwant's new O'Reilly book? It was supposed to be coming out some time
ago, and I've really been pining for it.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: Tue, 27 Jul 1999 05:32:37 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Outputting text as entered by user
Message-Id: <379d442b.678625@news.uniplus.ch>
On 26 Jul 1999 11:52:20 GMT, ansingam@chat.carleton.ca (Arul Singam)
wrote:
>> > Please email or post to newsgroup.
>
>> I think that either one of the two would have been the default action
>> for almost any newsreader. There really was no need to post that.
>
>Dont you see the "or"? That means it is unneccessary to do "both".
>Get some grammar knowledge in your brain before blabbering.
>
Try the following code:
use strict;
my @list = ("0 | 0 => ", "0 | 1 => ", "1 | 0 => ", "1 | 1 => ");
print "or:\n";
foreach (@list) {print $_, eval, "\n"}
print "xor:\n";
foreach (@list) {s/\|/\^/; print $_, eval, "\n"}
This is my understanding of OR you probalby wanted an XOR
Andreas
------------------------------
Date: Tue, 27 Jul 1999 07:45:41 GMT
From: Carfield Yim <c8133594@comp.polyu.edu.hk>
Subject: Pass by value or pass by reference?
Message-Id: <7njo34$ojf$1@nnrp1.deja.com>
I am new to perl, if you find this is a easy question, please tell me
where can I find solution.
When I pass an object as parameter to a function, or return an object
from a function,
i.e.: return ($rv);
db_write ($dbh);
is these operation pass the value (copy) or pass the reference (link)?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 27 Jul 1999 08:19:23 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl in webpages
Message-Id: <7njq2b$8p6$1@lublin.zrz.tu-berlin.de>
David Cassell <cassell@mail.cor.epa.gov> wrote in comp.lang.perl.misc:
>Anno Siegel wrote:
>>
>> Kevin Pickens <webmaster@source.findhere.com> wrote in comp.lang.perl.misc:
> [snip]
>> >Is there any way to get it to work properly (i.e. refresh or load in the
>> >frame without the download message)?
>>
>> Just because the html is created by a Perl script doesn't mean it's
>> a Perl problem. Ask a newsgroup with perl or cgi in it's name.
> ^^^^
> html
>
>A Freudian slip, although the naive reader may leap to an
>unwarranted conclusion.
Indeed. A conclusion I'd hate to support.
> [At least TomC didn't chide you for
>using it's when you meant its. :-]
There was a time when I thought confusing "its" and "it's" was
something that happened to other people. That was a long time ago...
Anno
------------------------------
Date: Tue, 27 Jul 1999 08:08:53 +0200
From: "Marco Cecconi" <sklivvz@tiscalinet.it>
Subject: Re: perl to interpret a XLS file?
Message-Id: <7njifh$d7l$1@aquila.tiscalinet.it>
I am pretty sure that Excel doesn't store graphs in XLS files as images!
You'd store
only the characteristics of the graph (e.g. "pie chart", "red slice"...) and
redraw it
every time...
What you can do is get Excel to save the data you want plotted in CSV format
(comma delimited) and then interpret that data and do the image yourself. I
think
you will find GD.pm very useful for the task
Cheers
Marco Cecconi
Inferentia S.p.A.
perl -e 'use Standard::Disclaimer;'
skao@my-deja.com wrote in message <7niorr$4b0$1@nnrp1.deja.com>...
>They want the ability to extract certain graphs from an Excel Spreadheet
>and saved to gif files. Catch though, this must be performed on the web
>server, instead of by the user on her native system (probably Windows
>95). This would seem to be an extremely hairy task, if it could be
>done. I would have to interpret the excel spreadsheet, first of all.
>After that is done, I would have to determine which objects to extract,
>and then somehow convert it to an acceptable file format
>(gif/jpg/etc...). Does anyone have any opinions/suggestions on how this
>could be accomplished?
>Are there currently any Perl scripts that would point me in the right
>direction? Or even something written in Java/C++/or existing unix
>utilities?
------------------------------
Date: Tue, 27 Jul 1999 10:10:54 +0200
From: Pavel Hlavnicka <pavel@asei.cz>
Subject: Problem making libraries
Message-Id: <379D698E.1941EB2C@asei.cz>
Hi all,
I'm poor Win NT user having troubles making perl libraries. I've
downloaded many Perl libs and didn't succeed to install any of them!
Result is almost always the same. Running Makefile.pl results with NO
errors (not always, but I don't care for this now). Generated makefile
is always incorrect (or not?).
For example processong of libnet-1.0606 look like this:
$ Makefile.pl
Checking for Socket...ok
Checking for IO::Socket...ok
Checking for Data::Dumper...ok
Writing Makefile for Net
$ make -v
GNU Make version 3.77, by Richard Stallman and Roland McGrath.)
(and more...)
$ make
Makefile:696: *** missing separator. Stop.
Here is the incorrect part of makefile:
# --- MakeMaker pm_to_blib section:
pm_to_blib: $(TO_INST_PM)
@$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
-e "pm_to_blib(qw[ <<pmfiles.dat ],'$(INST_LIB)\auto')"
$(PM_TO_BLIB) # <== line 696 ==>
<<
@$(TOUCH) $@
# --- MakeMaker selfdocument section:
I searched the Web for some hints, but I've found just huge docs for
make.
I can't read makefile, and before I take look for it, I'd like to ask
few questions:
Is there some need for special configuration or existence of some
folders, env. vars. ...?
What should I read. Is there some guide to makefiles. What are the
common problems on NT?
Thank you
Pavel
--
Pavel Hlavnicka
A.S.E.I. Ltd; Prague
tel.: +420 2 24106102
e-mail: pavel@asei.cz
------------------------------
Date: Tue, 27 Jul 1999 18:41:17 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: Problem making libraries
Message-Id: <MPG.12081bae6fd22c77989b86@news-server>
Pavel Hlavnicka writes ..
>I'm poor Win NT user having troubles making perl libraries.
<deletia>
>$ make -v
>GNU Make version 3.77, by Richard Stallman and Roland McGrath.)
>(and more...)
I think you'll find that Makefile.PL creates a Microsoft Visual C(++)
specific makefile that needs to be run with nmake
now .. I'm no expert either .. but the standard libnet-1.0606 builds for
me (using MSVC) with
perl Makefile.PL
nmake
nmake test
nmake install
I can't remember which module I read about this in .. maybe the mod_perl
one .. or maybe the perl build itself .. but it definitely said somewhere
that the Makefile.PL worked with nmake from MSVC or with make from
Borland with some changes
that all having been said .. if you're using ActiveState's port of perl
then you should have ppm onboard .. in which case you should use that for
downloading and installing as many of the modules as you can .. certainly
libnet is in there .. type this at a command prompt (assuming you have
ActiveState's perl port)
ppm install libnet
it should download and install the latest libnet that's in ActiveState's
module repository
>Is there some need for special configuration or existence of some
>folders, env. vars. ...?
if there is then it'd be in the accompanying readme file
>What should I read. Is there some guide to makefiles. What are the
>common problems on NT?
now here my knowledge completely dries up
--
jason - remove all hyphens for email reply -
------------------------------
Date: 27 Jul 1999 07:52:00 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Problem with sockets
Message-Id: <7njof0$8ji$1@lublin.zrz.tu-berlin.de>
Tommi Niemi <tniemi@mail.student.oulu.fi> wrote in comp.lang.perl.misc:
>
>I have a forking server (the code is from Panther book) and the problem
>is, that sometimes I got this error message:
>
> usage $fh->accept([PKG]) at program.pl line 544
>
>and code is here:
[snipped, except for (I suppose) line 544]
while($new_socket = $main_socket->accept()) {
Something strange is going on. In my version of IO::Socket, the
generation of this message is like this:
sub accept {
@_ == 1 || @_ == 2 or croak 'usage $sock->accept([PKG])';
Assuming your version is similar, your call is fine: The sub will
be called with an @_ of length 1. No way this can sometimes happen
and sometimes not. Look up the definition of accept in your
/yourlib/perl5/IO/Socket.pm and see what you find.
Anno
------------------------------
Date: 27 Jul 1999 08:42:55 GMT
From: tniemi@paju.oulu.fi (Tommi Niemi)
Subject: Re: Problem with sockets
Message-Id: <7njref$ecn$1@ousrvr3.oulu.fi>
In comp.lang.perl.misc Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> Tommi Niemi <tniemi@mail.student.oulu.fi> wrote in comp.lang.perl.misc:
> >
> >I have a forking server (the code is from Panther book) and the problem
> >is, that sometimes I got this error message:
> >
> > usage $fh->accept([PKG]) at program.pl line 544
> >
> >and code is here:
> [snipped, except for (I suppose) line 544]
> while($new_socket = $main_socket->accept()) {
> Something strange is going on. In my version of IO::Socket, the
> generation of this message is like this:
> sub accept {
> @_ == 1 || @_ == 2 or croak 'usage $sock->accept([PKG])';
> Assuming your version is similar, your call is fine: The sub will
> be called with an @_ of length 1. No way this can sometimes happen
> and sometimes not. Look up the definition of accept in your
> /yourlib/perl5/IO/Socket.pm and see what you find.
> Anno
My vesion is 1.1602 and there the geration of the message is:
sub accept {
@_ == 1 || @_ == 2 or croak 'usage $fh->accept([PKG])';
In the latest version ( 1.25 ? ) the message is just like you said.
- Tommi
------------------------------
Date: Tue, 27 Jul 1999 05:50:41 GMT
From: frank_hampshire@my-deja.com
Subject: Re: Server 500 error?
Message-Id: <7njhbf$jf7$1@nnrp1.deja.com>
Suart,
"HTTP 500 Server error" means that the script is not executing because
it has errors.
Try running it as "perl -wc <thescript>" to see if it compiles before
trying to run it as a CGI.
Frank
In article <7nianm$9si$1@gxsn.com>,
"Stuart" <Stuart@worm.globalnet.co.uk> wrote:
> I am new to cgi programming and have written a script in Perl and
placed it
> in the CGI-BIN directory in Personal Web Server. When ever running it
though
> I get a HTTP 500 server error, would anyone be kind enough to explain
what
> this means as I can't find it in any documentation.
> --
> - Stuart
> - Newsgroups@worm.globalnet.co.uk
> Turner & King Communications
> - Web Design - takc@worm.globalnet.co.uk
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 27 Jul 1999 08:12:03 +0300
From: cederstrom@kolumbus.REMOVE_THIS.fi (Juho Cederstrom)
Subject: Re: Server 500 error?
Message-Id: <slrn7pqft3.15s.cederstrom@vortex.cede.net>
On Tue, 27 Jul 1999 19:46:33 +0100,
Stuart <Stuart@worm.globalnet.co.uk> wrote:
> I get a HTTP 500 server error, would anyone be kind enough to explain what
There's an error in your script. Try running it from command line and
check the error logs.
--
#!/usr/bin/perl -wT -- Please take a look at my mail address when replying
use CGI;print &J,&A,&P,&H,"\n";sub J{return new CGI('x=J%75%73t%20')->param
('x')}sub A{$_='cndoetfhgehr ';s/\w(\w)/$1/g;return "A".$_}sub P{$_='B3RJ '
;tr/J3RB/lerP/;return$_}sub H{$_="Ibdlfs";s/(.)/chr(ord($1)-1)/eg;return$_}
------------------------------
Date: Tue, 27 Jul 1999 07:30:57 +0200
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Server NT et Perl
Message-Id: <379d4411.524144494f47414741@radiogaga.harz.de>
Jean-Marc Beaudoin (beaudoin.jean-marc@-NOSPAM-hydro.qc.ca) wrote:
: Vincent Maugain <V_Maugain@mail.dotcom.fr> a écrit:
: > I try to work on a server NT and when I start my form, my navigator
: > puts me the source of my file offre_cgi.pl
...
:
: You must configure your Web Server (ie.: IIS) for the proper script mapping
: to .pl or .cgi so it will know what to do with them.
:
: Ie.: Map .pl to c:\perl\bin\perl.exe % %
:
: The % % are very important.
It's particularly important to not post wrong information:
Those % must be %s (perhaps even in "").
And if the server offers the script source for download, it's not the
mapping that is wrong; the problem is that the server doesn't recognize
the directory as a script directory.
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
VMS is today what | work: mv@pdv-systeme.de
Microsoft wants | http://www.pdv-systeme.de/users/martinv/
Windows NT 8.0 to be! | home: martin@radiogaga.harz.de
------------------------------
Date: Mon, 26 Jul 1999 23:08:24 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: sort database and remove duplicates
Message-Id: <MPG.1206ecae166c9453989d4d@nntp.hpl.hp.com>
In article <379D04E0.71B637AA@rochester.rr.com> on Mon, 26 Jul 1999
21:01:20 -0400, Bob Walton <bwalton@rochester.rr.com> says...
...
> Assuming the output order is not important, try:
>
> while(<>){
> split /\|/;
Use of implicit split to @_ is deprecated at ...
> $h{$_[1]}=$_ if $_[0]>$h{$_[1]};
> }
...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 27 Jul 1999 07:53:48 +0200
From: specker@gandalf.rz.uni-frankfurt.de
Subject: Re: Special problem (Networking)
Message-Id: <9egn1wizlhv.fsf@gandalf.rz.uni-frankfurt.de>
"Yroslav Buga" <buga@ipm.lviv.ua> writes:
First of all, thanx for the fast reply!
> You can use this script to run netstat from perl:
> !/usr/bin/perl
> open (NET," netstat -n inet |");
> while ($res=<NET>)
> {
> print "$res";
> }
> close NSL;
> This will print all data from netstat.
Exactly what i didn't want, but thanx anyway.
I will give it a try anyway.
--
Sven
------------------------------
Date: 27 Jul 1999 07:56:53 +0200
From: specker@gandalf.rz.uni-frankfurt.de
Subject: Re: Special problem (Networking)
Message-Id: <9eglnc2zlcq.fsf@gandalf.rz.uni-frankfurt.de>
mgjv@comdyn.com.au (Martien Verbruggen) writes:
Thanx for your answer!
> > netstat -nf inet
> >
> > and grep to get the tcp-connections with the state ESTABLISHED.
>
> Sounds like a good solution to me.
Wail...
> > This solution is rather sluggish with many connections,
> > so i want to try using perl.
>
> I doubt very much that perl can do it much faster. netstat -n is
> probably the fastest method around. If the sluggishness you experience
> is a shell problem, and not a netstat problem (does it run as fast
> from the command line as you expect?), you can do this in perl in
> several ways, of which the following are probably reasonable ones:
Hmm...didn't think of this yet. Maybe the slowness is the
multiple greps....
Ill give it a try...thanx.
--
Sven
------------------------------
Date: Tue, 27 Jul 1999 06:07:04 GMT
From: frank_hampshire@my-deja.com
Subject: Re: special problem
Message-Id: <7njia5$k43$1@nnrp1.deja.com>
Frank,
You can do this using 'eval'. Try this small program.
I found that I had to declare the scope of the variables (in this case
main).I tried using my at first, but the array disappeared as soon as
the first eval ended (I guess that makes sense).
Cheers
Frank Hampshire
#!/usr/local/perl
my $string = "mp3";
eval "\@main::$string = ('these ','are ', 'test ', 'values ');";
eval "print \@main::$string";
In article <379A3B15.AD6144F5@xs4all.nl>,
Frank de Bot <debot@xs4all.nl> wrote:
> I want to do something weird ( I think ).
> I have a string which is called array:
>
> $string = "array";
>
> Now I want to create an array with that variable.
>
> @array = ""; # To put something in it is for later
>
> if I have a string whit the value "mp3" I want to create a array @mp3
>
> Is this possible?
>
> --
> Penpal International , Searchy.net
> http://www.debot.nl/ppi , http://www.searchy.net/
> ppi@debot.nl , support@searchy.net
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 27 Jul 1999 09:17:26 +0200
From: Steven Filipowicz <steven@*REMOVE*filipowicz.com>
To: elephant <elephant@bigpond.com>
Subject: Re: SSI command in Perl script problem
Message-Id: <379D5D06.A14C63CE@filipowicz.com>
> #--begin
> #!/usr/bin/perl -w
> use strict;
>
> $| = 1;
> print "Content-type: text/plain\n\n"; # just plain text for the test
>
> print "First\n";
>
> my $body = 0;
>
> for (`/usr/bin/perl -w countit.pl`)
> {
> unless ( $body) { $body = /^$/; }
> next unless $body;
>
> print;
> }
>
> print "Last\n";
> #--end
>
Hi!
Thank you very much for you reply!
Well still no result.
I get an internal server error.
This is the (short) script :
------------------------------------------------------------------------------------
#!/usr/local/bin/perl
###########################################################################
# COUNT IT! Version
1.1 #
# Written by Patrick Dingle
dimension@cgiworkshop.com #
# Released January 17, 1999 A Product of The CGI
Workshop #
#
-----------------------------------------------------------------------
#
# The CGI Workshop:
http://www.cgiworkshop.com #
#
-----------------------------------------------------------------------
#
###########################################################################
###########################################################################
# You may modify the following global constant variable
# ***** LOCATION AND NAME OF DATA FILE *****
# The location and name of the data file (The path is not necessary if
the
# data file is located in the same directory as this script.)
$datafile = "counts.dat";
# End of global variable
settings #
# ********************* DO NOT EDIT BELOW THIS LINE
********************* #
###########################################################################
$query = $ENV{QUERY_STRING};
$pagepath = $ENV{'DOCUMENT_URI'};
print "Content-type: text/html\n\n";
$file = 1;
while ($file eq 1)
{
if (open(TEMPFILE, "~ci-temp.tmp")) {
close (TEMPFILE);
}
else {
$file = 0;
}
}
open(TEMPFILE, ">~ci-temp.tmp");
close(TEMPFILE);
# Check to see if $query contains "stats". If so, show a statistics
page
if ($query eq "stats" || $query eq "STATS")
{
print "<html>\n";
print "<body bgcolor=white>\n";
print "<center><font color=blue size=6 face=\"arial\"><b>Counter
Statistics</b></font></center>\n";
print "<hr>\n";
print "<center>\n";
print "<table border=3 bgcolor=#4488BB>\n";
print "<tr><td bgcolor=YELLOW width=450><font color=black size=3
face=\"arial\"><b><center>HTML Page</center></b></font></td>\n";
print "<td bgcolor=YELLOW width=100><font color=black size=3
face=\"arial\"><b><center># Hits</center></b></font></td></tr>\n";
open(FILE, "$datafile");
@indata = <FILE>;
close(FILE);
foreach $lineofdata (@indata)
{
($doc, $hits) = split(/\|/, $lineofdata);
chop($hits);
if ($doc ne "")
{
print "<tr><td width=450 bgcolor=white><font color=black
size=3><b>$doc</b></font></td><td width=100 bgcolor=white><font
color=black size=3><b>$hits</b></font></td></tr>\n";
}
}
print "</table>\n";
print "</center>\n";
print "<hr>\n";
print "<center><font size=3><b>Count It! Version 1.1</b><br><font
size=-1>Copyright (C) 1998-1999 Patrick Dingle, All rights
reserved</font><br>A Product of <a
href=\"http://www.cgiworkshop.com/dimension\">Dimension's CGI
Workshop</a></font></center>\n";
print "</body></html>\n";
unlink "~ci-temp.tmp";
exit;
}
# Ensure that the document exists; creates a new one if it does not
open(FILE, ">>$datafile");
close(FILE);
open(FILE, "$datafile");
@indata = <FILE>;
close(FILE);
$onoff = 0;
open(FILE, ">$datafile");
foreach $temp (@indata)
{
chop($temp);
($uri, $count) = split(/\|/, $temp);
if ($uri eq $pagepath) {
$count++;
$onoff = 1;
print FILE "$uri|$count\n";
print "$count"; }
else { print FILE "$uri|$count\n"; }
}
if ($onoff eq 0) {
print FILE "$pagepath|1\n";
print "1"; }
close(FILE);
unlink "~ci-temp.tmp";
------------------------------------------------------------------------------------
With this SSI line in normal HTML file it works fine.
<!--#exec cgi="/cgi-bin/countit/countit.pl/"-->
Any idea's?
It doesn't have to be called with the SSI line a different way is also
okay.
Thanks.
------------------------------
Date: 27 Jul 1999 07:23:04 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Win32::EventLog
Message-Id: <7njmoo$8ha$1@lublin.zrz.tu-berlin.de>
Yroslav Buga <buga@ipm.lviv.ua> wrote in comp.lang.perl.misc:
>I think this will help you
>
>
>Paul Popour wrote in message <7n8iqe$i41$1@news3.infoave.net>...
>>Does anyone have any sample code of reading the entire message from an
>event
>>log entry?
[234 lines of uuencoded html snipped}
Paul Popour, in his original posting, made one mistake:
He posted an html question (or is it cgi, I don't know) to a perl
newsgroup.
In your reply you made several:
- You placed your followup above the quoted text. This is a bad habit.
- You posted an html file, which is off topic.
- The html in question is very probably of interest only to the
original poster. Even if it were on topic it should have been
mailed, not posted.
- You uuencoded an ascii file. This is not only unnecessary, it
also makes the file bigger.
- You posted uuencoded material without saying what it is. So you
probably made hundreds of people go through the hassle to decode
it, only to find that it's of no interest.
Please be more considerate in future.
Anno
------------------------------
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". 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 V9 Issue 268
*************************************