[11757] in Perl-Users-Digest
Perl-Users Digest, Issue: 5357 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 12 06:07:29 1999
Date: Mon, 12 Apr 99 03:00:18 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 12 Apr 1999 Volume: 8 Number: 5357
Today's topics:
Beginner in Perl <thomaslo@uiuc.edu>
Re: Beginner in Perl <uri@home.sysarch.com>
Re: Count Linenumber (Tad McClellan)
Re: form to email mails twice (Bart Lateur)
Re: HELP! - A very simple problem, I'm sure... (Tad McClellan)
Re: Hotmail's Homepages <Philip.Newton@datenrevision.de>
Re: How Do I Declare A Hash Without Errors? <Philip.Newton@datenrevision.de>
How to get yesterday date <art@allianceinter.com>
Re: How to get yesterday date <Philip.Newton@datenrevision.de>
Re: How to get yesterday date agniora@usa.net
Re: How to get yesterday date <rra@stanford.edu>
Re: how to read multipart HTML mail (I.J. Garlick)
Re: implement useradd in perl <uri@home.sysarch.com>
Re: implement useradd in perl (Sam Holden)
Re: implement useradd in perl <uri@home.sysarch.com>
Re: Move from IIS, ASP, COM, Java to Linux, Apache, mod (Steve Moon)
Re: passing variables from PERL to JavaScript <staffan@ngb.se>
Re: pragma - relevant? <Philip.Newton@datenrevision.de>
Re: pragma - The cgi is written in perl <Philip.Newton@datenrevision.de>
Re: Privacy for ...A followup question <bill@fccj.org>
Re: Q about Server Side Includes, Perl , and CPU utili (Lee)
Re: Quantum Variable <Philip.Newton@datenrevision.de>
Re: question about hash keys (Tad McClellan)
Question about perl install <okclub@communitech.net>
Re: using perl to load a web page (Tad McClellan)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 12 Apr 1999 00:08:24 -0500
From: Tom <thomaslo@uiuc.edu>
Subject: Beginner in Perl
Message-Id: <37117FC7.39DB@uiuc.edu>
Hello,
We have a cgi Perl script running off ZB Server Pro, but when the page
loads, it doesn't show any of the images or PDFs. The tags in the html
source code seem to be fine. Does anybody have any ideas?
Thanks.
------------------------------
Date: 12 Apr 1999 01:26:10 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Beginner in Perl
Message-Id: <x7u2umpfyl.fsf@home.sysarch.com>
>>>>> "T" == Tom <thomaslo@uiuc.edu> writes:
T> Hello,
T> We have a cgi Perl script running off ZB Server Pro, but when the page
T> loads, it doesn't show any of the images or PDFs. The tags in the html
T> source code seem to be fine. Does anybody have any ideas?
wait, i will load the PSI::ESP module and have it divine out the perl
part of the problem you pose! oh, damn, it crashed as it could not find
any code to debug.
oh well, back to cpan!
try actually asking about a perl problem and show something we could
look at. this is one of the most uninformed posts i have seen here in a
while.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 11 Apr 1999 20:04:01 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Count Linenumber
Message-Id: <h9dre7.jh2.ln@magna.metronet.com>
Jason Q. (pigs_can_fly@mindless.com) wrote:
: I'm no expert at perl but I use this (seemingly simple) way to count
: the number of lines.
: open (FILE, "file.txt") || die;
: @array = <FILE>;
: close (FILE);
: $lines = $#array+1;
: My question is, why don't the experts recommend this way?
Because it pulls the whole thing into memory when that
is not needed if all your're going to do is count the
lines.
May make a big difference if the file is truly large.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 12 Apr 1999 07:37:25 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: form to email mails twice
Message-Id: <37129d73.2690171@news.skynet.be>
steve schwarz wrote:
>i'm very new to perl, i have a very simple form whose sole purpose is to
>take data from a field and email to an adress. it works but it emails
>twice (the first mailing is correct, the second mailing shows a portion
>of what is supposed to be sent).
What doesn't look nice, is that your script doesn't send any response to
the browser. If you're lucky, fixing that should be enough.
It could be that the "POST" is done twice in a very quick succession,
when you click "submit". At least, it certainly looks that way if I
click on a "submit" button, and the first thing I see on the next page
is "transfer interrupted!", just before it starts reloading.
Solution? Provide a unique ID in the form. That probaly means that you
have to generate the form by script, i.e. use SSI or a template
mechanism (read HTML file, replace a specific substring with the ID,
using something like { s/$marker/$id/ }, and print the result).
In the CGI, refuse to send the mail again, if a mail has already been
sent from a form with that unique ID. That means maintaining a list of
ID's that have been used recently, in some data file(s).
And, actually, this question belongs more in a CGI newsgroup (such as
comp.infosystems.www.authoring.cgi, which btw is an automoderated
newgroup)
Bart.
------------------------------
Date: Sun, 11 Apr 1999 19:47:51 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: HELP! - A very simple problem, I'm sure...
Message-Id: <7bcre7.6f2.ln@magna.metronet.com>
Rick Delaney (rick.delaney@home.com) wrote:
: You have omitted the first few lines of your code which should look
: something like this:
: #/usr/local/bin/perl -w
: use strict;
: $filename = 'whatever';
: The first two lines are important and will catch a lot of mistakes you
: may make.
Like the one on the third line. heh, heh...
my $filename = 'whatever';
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 12 Apr 1999 10:50:47 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: Hotmail's Homepages
Message-Id: <3711B3E7.F8DB6FC4@datenrevision.de>
Steve Miles wrote:
>
> I think there is no way to protect the html source code - if there
> were, EVERYONE (or at least most compainies) would hide it.
And then browsers would not be able to see, parse, and render the HTML
source code. So hiding the source would be *extremely* unproductive.
(Especially since the server can't tell whether a browser is connecting,
or telnet, or LWP, or whatever.)
Cheers,
Philip
------------------------------
Date: Mon, 12 Apr 1999 11:07:10 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: How Do I Declare A Hash Without Errors?
Message-Id: <3711B7BE.567CC9C9@datenrevision.de>
Matthew O. Persico wrote:
>
> An array is initialized with
>
> my @arrayFoo = ();
>
> Therefore:
>
> my %hashFoo = (): #Note use of parens!
Note Uri's reply to Jerome's post regarding the parens. They're not
needed as arrays and hashes start off empty when declared with my().
Cheers,
Philip "and wrap your lines at column 72 already" Newton
------------------------------
Date: Mon, 12 Apr 1999 02:52:48 -0500
From: Art Gratchev <art@allianceinter.com>
Subject: How to get yesterday date
Message-Id: <3711A650.93878337@allianceinter.com>
Thanks to Bill Moseley, Larry Rosler, and Ron Reidy for answering my
previous question on how to get current system date.
Now, how do I get the yesterday's date? Of course I could write some
conversion subroutine, but there should be something more gracefull,
like localtime(time - something)?
Thanks,
-Art.
------------------------------
Date: Mon, 12 Apr 1999 11:25:00 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: How to get yesterday date
Message-Id: <3711BBEC.D77DC909@datenrevision.de>
Art Gratchev wrote:
>
> Now, how do I get the yesterday's date? Of course I could write some
> conversion subroutine, but there should be something more gracefull,
> like localtime(time - something)?
Something = 60 * 60 * 24 = 86400, most likely.
Cheers,
Philip
------------------------------
Date: Mon, 12 Apr 1999 09:44:25 GMT
From: agniora@usa.net
Subject: Re: How to get yesterday date
Message-Id: <7esf9o$a61$1@nnrp1.dejanews.com>
In article <3711A650.93878337@allianceinter.com>,
Art Gratchev <art@allianceinter.com> wrote:
> Thanks to Bill Moseley, Larry Rosler, and Ron Reidy for answering my
> previous question on how to get current system date.
> Now, how do I get the yesterday's date? Of course I could write some
> conversion subroutine, but there should be something more gracefull,
> like localtime(time - something)?
> Thanks,
> -Art.
>
use the Date::Calc module.
agniora
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Apr 1999 02:55:36 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: How to get yesterday date
Message-Id: <yliub2cgdj.fsf@windlord.stanford.edu>
Art Gratchev <art@allianceinter.com> writes:
> Thanks to Bill Moseley, Larry Rosler, and Ron Reidy for answering my
> previous question on how to get current system date. Now, how do I get
> the yesterday's date? Of course I could write some conversion
> subroutine, but there should be something more gracefull, like
> localtime(time - something)?
sub yesterday {
my $now = defined $_[0] ? $_[0] : time;
my $then = $now - 60 * 60 * 24;
my $ndst = (localtime $now)[8] > 0;
my $tdst = (localtime $then)[8] > 0;
$then - ($tdst - $ndst) * 60 * 60;
}
# Should give you "this time yesterday" in seconds since epoch relative to
# the first argument or the current time if no argument is given and
# suitable for passing to localtime or whatever else you need to do with
# it. $ndst is whether we're currently in daylight savings time; $tdst is
# whether the point 24 hours ago was in daylight savings time. If $tdst
# and $ndst are the same, a boundary wasn't crossed, and the correction
# will subtract 0. If $tdst is 1 and $ndst is 0, subtract an hour more
# from yesterday's time since we gained an extra hour while going off
# daylight savings time. If $tdst is 0 and $ndst is 1, subtract a
# negative hour (add an hour) to yesterday's time since we lost an hour.
#
# All of this is because during those days when one switches off or onto
# DST, a "day" isn't 24 hours long; it's either 23 or 25.
#
# The explicit settings of $ndst and $tdst are necessary because localtime
# only says it returns the system tm struct, and the system tm struct at
# least on Solaris doesn't guarantee any particuliar positive value (like,
# say, 1) for isdst, just a positive value. And that value can
# potentially be negative, if DST information isn't available (this sub
# just treats those cases like no DST).
#
# Note that between 2am and 3am on the day after the time zone switches
# off daylight savings time, the exact hour of "yesterday" corresponding
# to the current hour is not clearly defined. Note also that if used
# between 2am and 3am the day after the change to daylight savings time,
# the result will be between 3am and 4am of the previous day; it's
# arguable whether this is correct.
#
# This sub does not attempt to deal with leap seconds (most things don't).
#
# Copyright relinquished 1999 by Russ Allbery <rra@stanford.edu>
# This code is in the public domain
--
#!/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: Mon, 12 Apr 1999 09:27:08 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
To: kidkaboom@my-dejanews.com
Subject: Re: how to read multipart HTML mail
Message-Id: <FA2Kx8.Lp@csc.liv.ac.uk>
In article <7eomlg$c1v$1@nnrp1.dejanews.com>,
kidkaboom@my-dejanews.com writes:
> I am writing a program that will retrieve mail from a pop server, then when
> you select a message it will display the To, From, Subject, and Date headers.
> Then it will display the message below. This is all fine and dandy, I didn't
> have any problems with this, but when this address recieves a multi-part
> email it displays it straight as it is, which looks like this:
>
Me too. Fun aint'it?
>
> This is a multi-part message in MIME format.
[snipped: 1 example of multipart-alternate]
> ------=_NextPart_000_001F_01BE8063.154DF220--
>
>>>end the crap that is outputted
>
> This is displayed in the browser, so the HTML tags don't show up, but it still
> has some parts showing up twice...
>
You need to read the RFC's on MIME. This is a perfect example of
multipart-alternate. In your situation you are supposed to be displaying
the HTML version as the medium you are using to display it is capable of it.
That's the official (if somewhat abreviated line). Personally I beleive it
was sent to harass us by the Devil incarnate (worst offender by a long way
is MS) at the risk of starting a holy war.
> ANyways, to the point. I was wondering if anyone else has come across this
> and how they solved it. I couldn't find any modules that work with HTML mail
> (or else I missed it if there are any)
I would start investigating all o the MIME::* modules on CPAN.
Having said that you do need to deal with it, if you want to do your job
properly. I would strongly recommend you look at the RFC's on this subject
(all of them) I too thought I could do it with out reading them. You can't
or at least no where near competantly. I know as I still have a long way
to go and I am a bit further along than you.
>
> From Theodore
>
> PS, you can email me a copy of your reply, I don't mind at all...
Ok done.
--
Ian J. Garlick
ijg@csc.liv.ac.uk
If at first you don't succeed, give up, no use being a damn fool.
------------------------------
Date: 12 Apr 1999 01:19:59 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: implement useradd in perl
Message-Id: <x7wvzipg8v.fsf@home.sysarch.com>
>>>>> "RD" == Rick Delaney <rick.delaney@home.com> writes:
RD> Sam Holden wrote:
>>
>> Jonathan Ho <t0.ho@student.qut.edu.au> wrote:
>> >How do i write the perl shell script to implement the "useradd " command?
>>
>> The same way you would write it in c or sh.
RD> Yes.
RD> In particular, check out the entry for system. Then you write it the
RD> same way you would in C or sh.
not really. many years ago i wrote one in csh and it would be a very
different animal in perl. i called ed (remember that? it still is
useful) to edit passwd. in perl i might do it directly. several of the
ops in shell which are unix commands are builtins in perl. so system
probably would be needed but not for all things. and each site has its
own needs for a useradd progam so what perl vs. shell features will be
used is unknown until the specs are written.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 12 Apr 1999 05:27:19 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: implement useradd in perl
Message-Id: <slrn7h311n.evh.sholden@pgrad.cs.usyd.edu.au>
On 12 Apr 1999 01:19:59 -0400, Uri Guttman <uri@home.sysarch.com> wrote:
>>>>>> "RD" == Rick Delaney <rick.delaney@home.com> writes:
>
> RD> Sam Holden wrote:
> >>
> >> Jonathan Ho <t0.ho@student.qut.edu.au> wrote:
> >> >How do i write the perl shell script to implement the "useradd " command?
> >>
> >> The same way you would write it in c or sh.
>
> RD> Yes.
>
> RD> In particular, check out the entry for system. Then you write it the
> RD> same way you would in C or sh.
>
>not really. many years ago i wrote one in csh and it would be a very
>different animal in perl. i called ed (remember that? it still is
>useful) to edit passwd. in perl i might do it directly. several of the
>ops in shell which are unix commands are builtins in perl. so system
>probably would be needed but not for all things. and each site has its
>own needs for a useradd progam so what perl vs. shell features will be
>used is unknown until the specs are written.
I must admit I wouldn't use system() at all, unless I was being a smart-ass
and just calling an existing 'useradd'.
I'd be more likely to implement the whole thing in sh anyway (though I might
use perl for editing the passwd file, you can do cool things with vipw and
appropriate values of $EDITOR).
When I said the same way, I was trying to politely say that it wasn't a perl
question...
--
Sam
You can blame it all on the internet. I do...
--Larry Wall
------------------------------
Date: 12 Apr 1999 01:56:19 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: implement useradd in perl
Message-Id: <x7pv5apekc.fsf@home.sysarch.com>
>>>>> "SH" == Sam Holden <sholden@pgrad.cs.usyd.edu.au> writes:
SH> On 12 Apr 1999 01:19:59 -0400, Uri Guttman <uri@home.sysarch.com> wrote:
>>
>> not really. many years ago i wrote one in csh and it would be a very
>> different animal in perl. i called ed (remember that? it still is
>> useful) to edit passwd. in perl i might do it directly. several of the
>> ops in shell which are unix commands are builtins in perl. so system
>> probably would be needed but not for all things. and each site has its
>> own needs for a useradd progam so what perl vs. shell features will be
>> used is unknown until the specs are written.
SH> I must admit I wouldn't use system() at all, unless I was being a
SH> smart-ass and just calling an existing 'useradd'.
nah, this calls for a mix of perl and system. say you have a dummy dir
for new home dirs that needs to be copied over. cp -r is simpler to deal
with than some perl code. but chown and chmod are fine in perl.
SH> I'd be more likely to implement the whole thing in sh anyway
SH> (though I might use perl for editing the passwd file, you can do
SH> cool things with vipw and appropriate values of $EDITOR).
that is what i did, i made ed the $EDITOR and passed it the commands to
add a line. i wonder how i would do that in perl so perl would be the
editor? i mean staying in the same main script without any forks.
SH> When I said the same way, I was trying to politely say that it
SH> wasn't a perl question...
i would rather do it in perl than any shell in general. but as i said,
an awlful lot depends on the specs of the useradd. if you want to
emulate a full blown useradd as solaris does, perl would be much better
than any shell. one problem is that it still would not be very portable
since so much stuff is just different enough among unix flavors.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 12 Apr 1999 08:49:44 GMT
From: smoon2@no.spam.nycap.rr.com (Steve Moon)
Subject: Re: Move from IIS, ASP, COM, Java to Linux, Apache, mod_perl, Java?
Message-Id: <IsiQ2.645$zE3.21283@typhoon.nycap.rr.com>
Yeah, Perl probably would be better since it's all string processing. However
the application is already written, and it would be a piece of work to re-write
it/port it to Perl. I'm not sure what tn3270 modules are available for Perl
either. As it stands we have a very nice object-oriented system that has worked
very well in the real world.
Steve-
PS: Thanks for the reply!
>Check out JPL, the Java-Perl Library, free from O'Reilly. Written by
>Larry Wall, so you know it's awesome. That should do what you want.
>
>But why are you using Java to do the connect to your back-end host?
>That doesn't sound like you're playing to Java's strengths. Perl might
>be a better solution there too. Or not - I have been wrong before. :-)
>
>David
>--
>David Cassell, OAO
>cassell@mail.cor.epa.gov
>Senior Computing Specialist phone: (541)
>754-4468
>mathematical statistician fax: (541)
>754-4716
------------------------------
Date: Mon, 12 Apr 1999 09:56:38 +0200
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: passing variables from PERL to JavaScript
Message-Id: <3711A736.286885CF@ngb.se>
Jeff Thies wrote:
> I would like to know if javascript client could call perl server and
> perl would return a variable? Currently the way I have the server
> return a value is to write it between <script> tags in either an
> IFrame or a layer (4.x). I'm new to perl, I'm using Cold Fusion and
> find it very limiting.
I think the problem is on the JavaScript side. To my knowledge,
JavaScript cannot request anything from any server without sending a
http request through the browser. I might be wrong, because this is
clp.misc. The best solution seems to be to have an invisible frame
somewhere that you use for the communication.
Staffan
------------------------------
Date: Mon, 12 Apr 1999 10:49:17 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: pragma - relevant?
Message-Id: <3711B38C.7F5F65F1@datenrevision.de>
JTJ wrote:
>
> Relevant?
>
> Who wrote the rules on what little idiosyncracy I could not post?
>
> Look - I'm no newbie, just that this Pragma thing is getting on my
> nerves. Yes it's a browser stupidity. But I'm trying to make a
> """PERL""" script work.
How about this, then? Is it relevant to clpm?
"I want to write a program that will decode GIFs. It is to be written in
Perl. Can someone here post the GIF specification so I know what the
header looks like? Again, this is written in Perl." --> main problem is
with the GIF file format, not with Perl.
"I want to know how to determine whether a year is a leap year, in Perl"
--> main problem is with the leap year formula, which is
language-independent. A mathematical question, not primarily a Perl
question
Thank you for your consideration.
Cheers,
Philip
------------------------------
Date: Mon, 12 Apr 1999 10:45:36 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: pragma - The cgi is written in perl
Message-Id: <3711B2B0.DFBA5CB7@datenrevision.de>
Jonathan Stowe wrote:
>
> [...] for all the CGI cares [...]
Finally someone who can use 'the CGI' correctly! (Reading posts from
people who "Want h3lp wiTh sum k0ol CGI's I DL'd fr0m sumware" gets
boring after a while -- or even people who "want to write a CGI".)
Cheers,
Philip
------------------------------
Date: Sun, 11 Apr 1999 17:25:07 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Privacy for ...A followup question
Message-Id: <3711132f.0@usenet.fccj.cc.fl.us>
----------
In article <7eqtga$45f$0@208.231.50.134>, "x" <x@x.com> wrote:
> If I access my personal web site (which is running SSL) can the admin see
> the content of my web site. Also, if I use basic HTTP authentication
> (.htaccess, etc.) will the admin be able to intercept my password and log on
> to my SSL site?
>
> (I am not interested in goofing off at work; I just have to occasionally
> check my web site to see if one of my clients had and emergency.)
>
Yes and Yes; if they are any good at being admins.
That's why they are called admins to start with.
-Sneex- :]
______________________________________________________
"Never Mind" -- I'll improvise, adapt, and overcome;
everything else will be deleted.
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Mon, 12 Apr 1999 00:51:43 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Q about Server Side Includes, Perl , and CPU utilization
Message-Id: <B336F41F96681436DA@204.112.166.88>
In article <7erosk$3to$0@208.231.50.202>,
"Andrew Branson" <a_branson_1998@yahoo.com> wrote:
>I mosly program in C++/Java and this is my first large Perl project (about
>4K lines). I was wondering if using several SSI (execs) to build each and
>every page served takes up an excessive amount of CPU time. I just don't
>want to unintentionally abuse my service provider's server. Is there any way
>for me to measure this?
>
>Details:
>- I don't expect this site to have more than 50 hits per minute (peak, worst
>case senario). An average of 10000 hits per day.
>- Each page has 3 server side includes (typically, a total of about 200
>lines of code runs per page to generate the header, footer and body of web
>page).
>- Server is BSDI running Apache; H/w: Pentium II 350MHz.
As I'm sure you will be told a dozen times or more, this Q should be in
comp.infosystems.www.servers...
I'm quite certain that the server will choke under that load. Maybe not if
mod_perl is compiled into Apache.
Much better to:
a) use better hardware,
b) program in C, and/or
c) redesign for a single ssi. (better yet, a cgi that outputs the entire
page) The static html between the dynamic bits can be read from file.
Lee
------------------------------
Date: Mon, 12 Apr 1999 10:37:44 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: Quantum Variable
Message-Id: <3711B0D8.E0B904BE@datenrevision.de>
Andrew Perrin wrote:
>
> Well, I can't answer your actual questions but can suggest some cleaning up that might at least clarify where your error is happening:
I, too, can suggest some cleaning up: how about wrapping your lines at
72 to 76 columns (to allow for quoting)? Would look a lot better.
Cheers,
Philip
------------------------------
Date: Sun, 11 Apr 1999 19:43:21 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: question about hash keys
Message-Id: <p2cre7.6f2.ln@magna.metronet.com>
Vincent Vanbiervliet (vvb@ibm.net) wrote:
: If you try
: print "$h{123} $h{'123'}";
: the output will be
: c c
: The reason is that whatever is between the { and } can be written with or
^^^^^^^^
: without the quotes, it is always interpreted as quoted.
^^^^^^
A little too absolute there.
It is considered quoted if it "looks like" Perl's idea
of a name, else the quotes _are_ required.
$hash{foo_bar} = 1; # OK
$hash{foo-bar} = 1; # not OK
: Thus, as a key, both 123 and '123' are regarded the same, so on line 3 you
: modify the value you defined on line 1.
: Just read the camel for more details.
: Boson wrote in message <370e284b.97821872@news.earthlink.net>...
: >I have been experimenting with the hash keys...I don't understand why
: >this little code prints out "b c". I was expecting "a b c" or maybe
: >just "c".
: >
: >$h{123} = 'a';
: >$h{'0123'} = 'b';
: >$h{'123'} = 'c';
: >print "$h{$_} " foreach (keys %h);
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 12 Apr 1999 16:01:08 +0900
From: =?euc-kr?B?udrBvrq5IChQYXJrLCBKb25nLVBvcmsp?= <okclub@communitech.net>
Subject: Question about perl install
Message-Id: <7es5u3$c9u$1@news2.kornet.net>
I don't know Why I have erro message. Please Help me..
[2] sh Configure
/bin/cat.exe: ./try: input file is output file
/bin/cat.exe: ./try: input file is output file
: Can't open
Hmm... ': use /bin/sh' does not guarantee sh startup...
You may have to fix up the shell scripts to make sure /bin/sh runs them.
Beginning of configuration questions for perl5.
Checking echo to see how to suppress newlines...
...using -n.
The star should be here-->*
First let's make sure your kit is complete. Checking...
Looks good...
Would you like to see the instructions? [n]
Locating common programs...
: Can't open
I don't know where 'awk' is, and my life depends on it.
Go find a public domain implementation or fix your PATH setting!
[3] sh awk
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
awk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options:
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
-m[fr] val
-W compat --compat
-W copyleft --copyleft
-W copyright --copyright
-W help --help
-W lint --lint
-W lint-old --lint-old
-W posix --posix
-W re-interval --re-interval
-W source=program-text --source=program-text
-W traditional --traditional
-W usage --usage
-W version --version
Report bugs to bug-gnu-utils@prep.ai.mit.edu,
with a Cc: to arnold@gnu.ai.mit.edu
------------------------------
Date: Sun, 11 Apr 1999 19:37:57 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: using perl to load a web page
Message-Id: <lobre7.6f2.ln@magna.metronet.com>
Steven T. Henderson (stevenhenderson@prodigy.net) wrote:
: or even better, just change the URL:
: print <<RELOAD;
: Content-type: text/html\n\n
: <HTML><HEAD></HEAD><BODY><META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;
^ ^ ^
: URL=$HTML_HOME/$HTML_DEFAULT\"></BODY></HTML>
^
: RELOAD
You don't need any of those backslashes in your here-doc.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
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 5357
**************************************