[19961] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2156 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 19 11:06:18 2001

Date: Mon, 19 Nov 2001 08:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1006185908-v10-i2156@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 19 Nov 2001     Volume: 10 Number: 2156

Today's topics:
    Re: 'stdin' instead of 'STDIN' (Randal L. Schwartz)
    Re: (Newbie question) Premature end of script headers   zentara@highstream.net
    Re: (Newbie question) Premature end of script headers   <godzilla@stomp.stomp.tokyo>
    Re: (Newbie question) Premature end of script headers   <godzilla@stomp.stomp.tokyo>
    Re: (Newbie question) Premature end of script headers   <josef.moellers@fujitsu-siemens.com>
    Re: (Newbie question) Premature end of script headers a (Mark Taylor)
    Re: (Newbie question) Premature end of script headers a <wrightkevin@ntlworld.com>
    Re: Binary issues.. (Anno Siegel)
        Compiling Modules with CPAN and VC++ on shared drive (John Menke)
        Cron and Open2 issues (Drew Myers)
    Re: Cron and Open2 issues <ccx138@coventry.ac.uk>
        Determine a module's version <heiko.rau@spamshield.t-systems.de>
    Re: Determine a module's version <ilya@martynov.org>
    Re: Determine a module's version <heiko.rau@spamshield.t-systems.de>
    Re: Determine a module's version <ilya@martynov.org>
    Re: HTTP Server using Sockets <bart.lateur@skynet.be>
    Re: if statements are not working! what am i missing? (Anno Siegel)
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Please Kindly Help With DBI <cpryce@pryce.net>
        Proc::Daemon-question <mr.thanquol@gmx.de>
    Re: relinquishing group permissions (Anno Siegel)
        Screen Prints (D. Moore)
    Re: separate cgi file for subroutines (Tad McClellan)
    Re: Setting Cookie nobull@mail.com
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: temporary file deleting too soon <nobody@nowhere.com>
    Re: temporary file deleting too soon <flavell@mail.cern.ch>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 19 Nov 2001 07:36:52 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: 'stdin' instead of 'STDIN'
Message-Id: <m13d3abwmj.fsf@halfdome.holdit.com>

>>>>> "Uri" == Uri Guttman <uri@stemsystems.com> writes:

Uri> stdin is a special case alias for STDIN. from perl.c:

But if I recall, stdin is only STDIN in main.  So STDIN is preferred,
because it works in all packages.

Uri> The filehandles STDIN, STDOUT, and STDERR are predefined.  (The
Uri> filehandles C<stdin>, C<stdout>, and C<stderr> will also work except in
Uri> packages, where they would be interpreted as local identifiers rather
Uri> than global.) 

Oh.  It even says that. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Mon, 19 Nov 2001 09:06:05 -0500
From: zentara@highstream.net
Subject: Re: (Newbie question) Premature end of script headers    arggggggggggggggggg!
Message-Id: <764ivtckv2p7copj1k9jgjb616s0lqh849@4ax.com>

On Mon, 19 Nov 2001 03:18:56 -0800, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:

>The cgi group auto-bot is still screwed up. One of
>its more noticable problems is sending posts to
>Never Never Land rather than propagating them.
>
>It would be prudent to not redirect people there.

Hi Godzilla, I've been seeing your posts in the
cgi newsgroup about getting rid of the posting bot.
I've been sent to "never-never-land" myself. Trying to
post to that newsgroup is a waste of time.

My question is why don't you (or others) startup a new unmoderated
cgi newsgroup?  That way we can post our stupid questions there.

passme :-)



------------------------------

Date: Mon, 19 Nov 2001 03:18:56 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: (Newbie question) Premature end of script headers  arggggggggggggggggg!
Message-Id: <3BF8EAA0.DE78EF13@stomp.stomp.tokyo>

Paul Boardman wrote:
 
> wrightkevin wrote:
 
> > Apologies if this is the wrong group.
 
> some people would point you towards comp.infosystems.www.authoring.cgi
> but there have been problems with this group (which I think are sorted
> out now).

The cgi group auto-bot is still screwed up. One of
its more noticable problems is sending posts to
Never Never Land rather than propagating them.

It would be prudent to not redirect people there.


Godzilla!


------------------------------

Date: Mon, 19 Nov 2001 04:22:29 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: (Newbie question) Premature end of script headers  arggggggggggggggggg!
Message-Id: <3BF8F985.FD568654@stomp.stomp.tokyo>

brian d boy unknowingly wrote in a different group:
 
> Godzilla! wrote:
> > brian d boy wrote:
> > > wrightkevin wrote:

> > > > Apologies if this is the wrong group.

> > > indeed it is.  try comp.infosystems.www.authoring.cgi :)
 
> > The cgi group auto-bot is still screwed up. One of
> > its more noticable problems is sending posts to
> > Never Never Land rather than propagating them.

 
> it has been fixed for awhile.  indeed, your post showed up there


This is untrue as evidenced by recent articles between
Ms. King and myself discussing this problem I cite.
She has indicated no resolution for this problem.

Do you find it odd a person who is not the sponsor
of the cgi group, to be in charge of it and making
decisions regarding the cgi group, with both items
being in violation of USENET traditions and the cgi
group's charter?


I find Ms. King's attempts to censor both my call for
discussion and call for informal vote, to be even more
odd, rather disturbing actually.


> (well, here, since you failed to notice the follow-ups).


What evidence do you have indicating I failed to note
your follow-up? You set the follow-up. Clearly you
intend to read responses in the cgi group. It is
readily apparent I am paying more attention than you.


  "...indeed, your post showed up there"

This is very apparent by your posting to the cgi
group and using these words of yours,

 "...showed up there"

You think are posting to the clpm group. You are
most certainly confused and not paying attention;
you have posted to the wrong group as a result of
not paying attention to your own set follow-up.


I am attentive, a lot more attentive than you.


Godzilla!


------------------------------

Date: Mon, 19 Nov 2001 10:47:47 +0100
From: Josef =?iso-8859-1?Q?M=F6llers?= <josef.moellers@fujitsu-siemens.com>
Subject: Re: (Newbie question) Premature end of script headers  arggggggggggggggggg!
Message-Id: <3BF8D543.C6840EA6@fujitsu-siemens.com>

wrightkevin wrote:
> =

> Hi,
> =

> Apologies if this is the wrong group.
> =

> I've tried to write the simplest perl cgi-script I could come up with
> I have transferred it in ascii mode. Think the permissions are ok!
> =

> Here is the code:
> =

> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
> print "They dont get much simpler than this";
> =

> Here is the error log:
> =

> [Mon Nov 19 00:13:15 2001] [error] [client 62.252.0.5] Premature end of=

> script headers: /data/wrightkevin/s2.pl
> [Mon Nov 19 00:13:15 2001] [error] [client 62.252.0.5] MOD_VR9: Error 5=
00
> occured while processing : /data/wrightkevin/s2.pl
> [Mon Nov 19 00:13:29 2001] [error] [client 62.252.0.5] Premature end of=

> script headers: /data/wrightkevin/s2.pl
> [Mon Nov 19 00:13:29 2001] [error] [client 62.252.0.5] MOD_VR9: Error 5=
00
> occured while processing : /data/wrightkevin/s2.pl
> [Mon Nov 19 00:14:31 2001] [error] [client 62.252.0.5] Premature end of=

> script headers: /data/wrightkevin/cgi-bin/s2.pl
> [Mon Nov 19 00:14:31 2001] [error] [client 62.252.0.5] MOD_VR9: Error 5=
00
> occured while processing : /data/wrightkevin/cgi-bin/s2.pl
> [Mon Nov 19 00:33:07 2001] [error] [client 62.252.0.5] Premature end of=

> script headers: /data/wrightkevin/cgi-bin/s2.pl
> [Mon Nov 19 00:33:07 2001] [error] [client 62.252.0.5] MOD_VR9: Error 5=
00
> occured while processing : /data/wrightkevin/cgi-bin/s2.pl
> [Mon Nov 19 00:41:58 2001] [error] [client 62.252.0.5] Premature end of=

> script headers: /data/wrightkevin/cgi-bin/s2.pl
> [Mon Nov 19 00:41:58 2001] [error] [client 62.252.0.5] MOD_VR9: Error 5=
00
> occured while processing : /data/wrightkevin/cgi-bin/s2.pl

I'm no HTML expert, but what your program outputs doesn't really look
html to me. I'm missing the usual tags:
	<html>
	<head>
	</head>
	<body>
	</body>
	</html>

Since the error message complains about a premature end of script
header, you might try to output the necessary tags.

HTH,
-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize
						-- T.  Pratchett


------------------------------

Date: 19 Nov 2001 09:00:49 -0600
From: mtaylor@lrim.com (Mark Taylor)
Subject: Re: (Newbie question) Premature end of script headers arggggggggggggggggg!
Message-Id: <Xns915E5E69A93Fmtaylorlrimcom@128.242.171.114>

"wrightkevin" <wrightkevin@ntlworld.com> wrote in
<Ow3K7.16656$%p4.2101124@news6-win.server.ntlworld.com>: 

>Hi,
>
>Apologies if this is the wrong group.
>
>I've tried to write the simplest perl cgi-script I could come up with
>I have transferred it in ascii mode. Think the permissions are ok!
>
>
>Here is the code:
>
>#!/usr/bin/perl
>print "Content-type: text/html\n\n";
>print "They dont get much simpler than this";
>
>
>Here is the error log:
>
>[Mon Nov 19 00:13:15 2001] [error] [client 62.252.0.5] Premature end of
>script headers: /data/wrightkevin/s2.pl
>[Mon Nov 19 00:13:15 2001] [error] [client 62.252.0.5] MOD_VR9: Error
>500 occured while processing : /data/wrightkevin/s2.pl
>[Mon Nov 19 00:13:29 2001] [error] [client 62.252.0.5] Premature end of
>script headers: /data/wrightkevin/s2.pl
>[Mon Nov 19 00:13:29 2001] [error] [client 62.252.0.5] MOD_VR9: Error
>500 occured while processing : /data/wrightkevin/s2.pl
>[Mon Nov 19 00:14:31 2001] [error] [client 62.252.0.5] Premature end of
>script headers: /data/wrightkevin/cgi-bin/s2.pl
>[Mon Nov 19 00:14:31 2001] [error] [client 62.252.0.5] MOD_VR9: Error
>500 occured while processing : /data/wrightkevin/cgi-bin/s2.pl
>[Mon Nov 19 00:33:07 2001] [error] [client 62.252.0.5] Premature end of
>script headers: /data/wrightkevin/cgi-bin/s2.pl
>[Mon Nov 19 00:33:07 2001] [error] [client 62.252.0.5] MOD_VR9: Error
>500 occured while processing : /data/wrightkevin/cgi-bin/s2.pl
>[Mon Nov 19 00:41:58 2001] [error] [client 62.252.0.5] Premature end of
>script headers: /data/wrightkevin/cgi-bin/s2.pl
>[Mon Nov 19 00:41:58 2001] [error] [client 62.252.0.5] MOD_VR9: Error
>500 occured while processing : /data/wrightkevin/cgi-bin/s2.pl
>
>
>I have tried ftp'ing the file to home home and home/cgi-bin directories.
>(No difference)
>
>
>I have looked up this error on google and elsewhere and have found that
>I am not the first programmer to encounter this message but I am still
>none the wiser.
>Please help.
>
>Thank you.
>
>Kevin Wright.
>
>
>

Kevin,

Try changing your program name from s2.pl to s2.cgi

Then make sure your path to perl is correct. Ask your ISP to verify it.


Mark

______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net


------------------------------

Date: Mon, 19 Nov 2001 15:39:25 -0000
From: "wrightkevin" <wrightkevin@ntlworld.com>
Subject: Re: (Newbie question) Premature end of script headers arggggggggggggggggg!
Message-Id: <OI9K7.16866$9Q4.2746307@news2-win.server.ntlworld.com>

Hi Mark

I appreciate your replying. Changing the extension of the
script to cgi didn't help as indicated by the log (at the bottom of
this post) .

I've also shown the contents of the script. Other people
have told me the script works fine on their systems. So I
guess that's ok.

As to the location of the Perl interpreter: This is what vr9
have to say about it.

This is from their FAQ on CGI Problems:

Where is PERL located on your server?
Perl 5.005 is located at /usr/bin/perl
Make sure you choose the right one.

Does that correspond with my script? I'm not sure (they look the same!)
Please advise.

Kevin Wright.

[Mon Nov 19 07:42:50 2001] [error] [client 62.252.0.5] MOD_VR9: File not
found: /data/wrightkevin/s2.cgi
[Mon Nov 19 07:42:57 2001] [error] [client 62.252.0.5] MOD_VR9: File not
found: /data/wrightkevin/s2.cgi
[Mon Nov 19 07:42:58 2001] [error] [client 62.252.0.5] MOD_VR9: File not
found: /data/wrightkevin/s2.cgi
[Mon Nov 19 07:43:34 2001] [error] [client 62.252.0.5] Premature end of
script headers: /data/wrightkevin/cgi-bin/s2.cgi
[Mon Nov 19 07:43:34 2001] [error] [client 62.252.0.5] MOD_VR9: Error 500
occured while processing : /data/wrightkevin/cgi-bin/s2.cgi


Contents of s2.cgi

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "They dont get much simpler than this";






"Mark Taylor" <mtaylor@lrim.com> wrote in message
news:Xns915E5E69A93Fmtaylorlrimcom@128.242.171.114...
> "wrightkevin" <wrightkevin@ntlworld.com> wrote in
> <Ow3K7.16656$%p4.2101124@news6-win.server.ntlworld.com>:
>
> >Hi,
> >
> >Apologies if this is the wrong group.
> >
> >I've tried to write the simplest perl cgi-script I could come up with
> >I have transferred it in ascii mode. Think the permissions are ok!
> >
> >
> >Here is the code:
> >
> >#!/usr/bin/perl
> >print "Content-type: text/html\n\n";
> >print "They dont get much simpler than this";
> >
> >
> >Here is the error log:
> >
> >[Mon Nov 19 00:13:15 2001] [error] [client 62.252.0.5] Premature end of
> >script headers: /data/wrightkevin/s2.pl
> >[Mon Nov 19 00:13:15 2001] [error] [client 62.252.0.5] MOD_VR9: Error
> >500 occured while processing : /data/wrightkevin/s2.pl
> >[Mon Nov 19 00:13:29 2001] [error] [client 62.252.0.5] Premature end of
> >script headers: /data/wrightkevin/s2.pl
> >[Mon Nov 19 00:13:29 2001] [error] [client 62.252.0.5] MOD_VR9: Error
> >500 occured while processing : /data/wrightkevin/s2.pl
> >[Mon Nov 19 00:14:31 2001] [error] [client 62.252.0.5] Premature end of
> >script headers: /data/wrightkevin/cgi-bin/s2.pl
> >[Mon Nov 19 00:14:31 2001] [error] [client 62.252.0.5] MOD_VR9: Error
> >500 occured while processing : /data/wrightkevin/cgi-bin/s2.pl
> >[Mon Nov 19 00:33:07 2001] [error] [client 62.252.0.5] Premature end of
> >script headers: /data/wrightkevin/cgi-bin/s2.pl
> >[Mon Nov 19 00:33:07 2001] [error] [client 62.252.0.5] MOD_VR9: Error
> >500 occured while processing : /data/wrightkevin/cgi-bin/s2.pl
> >[Mon Nov 19 00:41:58 2001] [error] [client 62.252.0.5] Premature end of
> >script headers: /data/wrightkevin/cgi-bin/s2.pl
> >[Mon Nov 19 00:41:58 2001] [error] [client 62.252.0.5] MOD_VR9: Error
> >500 occured while processing : /data/wrightkevin/cgi-bin/s2.pl
> >
> >
> >I have tried ftp'ing the file to home home and home/cgi-bin directories.
> >(No difference)
> >
> >
> >I have looked up this error on google and elsewhere and have found that
> >I am not the first programmer to encounter this message but I am still
> >none the wiser.
> >Please help.
> >
> >Thank you.
> >
> >Kevin Wright.
> >
> >
> >
>
> Kevin,
>
> Try changing your program name from s2.pl to s2.cgi
>
> Then make sure your path to perl is correct. Ask your ISP to verify it.
>
>
> Mark
>
>
____________________________________________________________________________
__
> Posted Via Binaries.net = SPEED+RETENTION+COMPLETION =
http://www.binaries.net




------------------------------

Date: 19 Nov 2001 14:46:40 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Binary issues..
Message-Id: <9tb60g$iu2$1@mamenchi.zrz.TU-Berlin.DE>

According to Martien Verbruggen  <mgjv@tradingpost.com.au>:

[...]
 
> Then, the file is read in in chunks of 1kb (arbitrary size, can be

[...]

> variable is incremented, and the last length $marker bytes are saved to
> prepend to the next buffer. This last operation is done to make sure
> that we find a marker when it straddles the boundary between two reads.

This imposes a lower limit on the buffer size:  The buffer must be big
enough to hold the longest value of $marker.

Anno


------------------------------

Date: 19 Nov 2001 06:32:07 -0800
From: jmenke@scsnet.csc.com (John Menke)
Subject: Compiling Modules with CPAN and VC++ on shared drive
Message-Id: <3a2d73ac.0111190632.57103592@posting.google.com>

Can I compile and install modules with the CPAN module on a Windows
2000 computer without VC++ installed if I congiure the CPAN module to
point to a Network share with VC++ installed on it?

If so how do I configure the parameters?

john


------------------------------

Date: 19 Nov 2001 04:53:17 -0800
From: bh_ent@hotmail.com (Drew Myers)
Subject: Cron and Open2 issues
Message-Id: <d1b6a249.0111190453.2ce042fa@posting.google.com>

Has anyone experienced issues running perl programs from cron that
utilize the IPC::Open2 module?  I have a perl program that runs, but
doesn't do any of the inter-process communication that it should, but
it runs from the command-line just fine.

Here's what I've done: 
1)  I always use the full path for all the programs I call internal to
the Perl program (and I've double-checked this).
2)  I've removed any STDIN STDOUT STDERR redirection from the cron
entry (so the entry looks something like "00 10 * * *
/home/bh_ent/perl/myscript.pl").
3)  I've also explicitly declared all of the @INC variable in the
program via use libs.

Is there anything else I should check?  I'm hesitant to post the
program, as it is quite lengthy.

Thanks in advance,
Drew Myers


------------------------------

Date: Mon, 19 Nov 2001 13:37:14 +0000
From: John Tutchings <ccx138@coventry.ac.uk>
Subject: Re: Cron and Open2 issues
Message-Id: <3BF90B0A.671949F2@coventry.ac.uk>



Drew Myers wrote:

> Has anyone experienced issues running perl programs from cron that
> utilize the IPC::Open2 module?  I have a perl program that runs, but
> doesn't do any of the inter-process communication that it should, but
> it runs from the command-line just fine.
>
> Here's what I've done:
> 1)  I always use the full path for all the programs I call internal to
> the Perl program (and I've double-checked this).
> 2)  I've removed any STDIN STDOUT STDERR redirection from the cron
> entry (so the entry looks something like "00 10 * * *
> /home/bh_ent/perl/myscript.pl").
> 3)  I've also explicitly declared all of the @INC variable in the
> program via use libs.
>
> Is there anything else I should check?  I'm hesitant to post the
> program, as it is quite lengthy.
>
> Thanks in advance,
> Drew Myers

You could check any environmental variables that are needed for your
script to run.
As a debug just get it to spit them all out to a file and compare them.
Also if you run the script as an "at" job it should take the environment
with it, so see if it runs like that.


--
JMT



------------------------------

Date: Mon, 19 Nov 2001 14:37:02 +0100
From: "Heiko Rau" <heiko.rau@spamshield.t-systems.de>
Subject: Determine a module's version
Message-Id: <9tb1mp$g01$1@news.sns-felb.debis.de>

Hi all,

depending on the platform I use, I have to deal with different versions of a
certain module. To deal with that, I'd like to use some code similar to
this:

    $version = $Module::VERSION;

    if( $version < X ) {
        ...
        <code to handle old version>
        ...
    } else {
        ...
        <code to handle new version>
        ...
    }


But $version is always empty -- despite the variable VERSION in Module being
defined. Attempts with Module->require_version(X) don't show the behavior
needed for the code above.

Any helpful comments are welcome.

Tanks in advance.

Heiko




------------------------------

Date: 19 Nov 2001 16:49:57 +0300
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: Determine a module's version
Message-Id: <87u1vqvpiy.fsf@abra.ru>

>>>>> On Mon, 19 Nov 2001 14:37:02 +0100, "Heiko Rau" <heiko.rau@spamshield.t-systems.de> said:


HR>     $version = $Module::VERSION;

HR>     if( $version < X ) {
HR>         ...
HR>         <code to handle old version>
HR>         ...
HR>     } else {
HR>         ...
HR>         <code to handle new version>
HR>         ...
HR>     }


HR> But $version is always empty -- despite the variable VERSION in
HR> Module being defined. Attempts with Module->require_version(X)
HR> don't show the behavior needed for the code above.

Probably you are missing

    require Module;

Module should be loaded before you can check its version.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)          TIV.net (http://tiv.net/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


------------------------------

Date: Mon, 19 Nov 2001 15:41:09 +0100
From: "Heiko Rau" <heiko.rau@spamshield.t-systems.de>
Subject: Re: Determine a module's version
Message-Id: <9tb5ev$he5$1@news.sns-felb.debis.de>



"Ilya Martynov" <ilya@martynov.org> schrieb im Newsbeitrag
news:<87u1vqvpiy.fsf@abra.ru>...
> >>>>> On Mon, 19 Nov 2001 14:37:02 +0100, "Heiko Rau"
<heiko.rau@spamshield.t-systems.de> said:
>
>
> Probably you are missing
>
>     require Module;
>
> Module should be loaded before you can check its version.
>

I did use

 use Module;

What is the difference between "use" and "require" and does it affect my
code snippet?

Regards,

Heiko




------------------------------

Date: 19 Nov 2001 18:10:59 +0300
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: Determine a module's version
Message-Id: <87g07au77g.fsf@abra.ru>

>>>>> On Mon, 19 Nov 2001 15:41:09 +0100, "Heiko Rau" <heiko.rau@spamshield.t-systems.de> said:

HR> I did use

HR>  use Module;

HR> What is the difference between "use" and "require" and does it affect my
HR> code snippet?

use Module is same as BEGIN { require Module; import Module }

Anyway both should load module so it should not affect code snippet.

Are you sure module does contain $VERSION? Show sources if it is
possible.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)          TIV.net (http://tiv.net/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


------------------------------

Date: Mon, 19 Nov 2001 11:26:16 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: HTTP Server using Sockets
Message-Id: <joqhvtk2ehfb8lk20nilo8n33lvp5m1imc@4ax.com>

Rohit Nadhani wrote:

>I am new to Perl and am trying to develop a HTTP server using sockets.
>
>Everything works fine till accept(), but I don't know how to read the
>complete HTTP POST and then send a response back to the client.

New to Perl, and already developing a HTTP server?!? That's trying to
run before you can even walk.

Oh well. First of all, Lincoln Stein's book "Network programming with
Perl" is a really excellent resource.

And second: don't reinvent the wheel. At least get your inspiration from
libraries that work, i.e. HTTP::Daemon for a http server in pure perl,
and CGI (= CGI.pm) for reading user supplied data.
(The latter is written by... Lincoln Stein. Yup, the same guy.)

-- 
	Bart.


------------------------------

Date: 19 Nov 2001 11:43:49 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: if statements are not working! what am i missing?
Message-Id: <9tar9l$4s5$1@mamenchi.zrz.TU-Berlin.DE>

According to Mark Jason Dominus <mjd@plover.com>:
> In article <3bf69cb6.87164005@news.wcu.edu>,
> B Smith <sceva_17@yahoo.com> wrote:
> >when comparing a character in a string to a single letter, say c, is
> >there anything special I have to do? 
> 
> You must use 'eq' instead of '=='.
> 
> '==' is only for comparing numbers.

He should also quote the character 'c' instead of using a bareword.

Anno


------------------------------

Date: Mon, 19 Nov 2001 15:45:37 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <tvia91pg9e6j80@corp.supernews.com>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 12 Nov 2001 16:09:05 GMT and ending at
19 Nov 2001 13:49:57 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2001 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  124 (42.5% of all posters)
Articles: 186 (21.2% of all articles)
Volume generated: 322.6 kb (19.3% of total volume)
    - headers:    148.8 kb (3,037 lines)
    - bodies:     172.2 kb (5,761 lines)
    - original:   125.9 kb (4,386 lines)
    - signatures: 1.4 kb (30 lines)

Original Content Rating: 0.731

Averages
========

Posts per poster: 1.5
    median: 1.0 post
    mode:   1 post - 91 posters
    s:      1.2 posts
Message size: 1776.2 bytes
    - header:     819.4 bytes (16.3 lines)
    - body:       948.3 bytes (31.0 lines)
    - original:   692.9 bytes (23.6 lines)
    - signature:  7.5 bytes (0.2 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

    6    11.3 (  5.2/  6.1/  5.5)  "Mike Schmitt" <mds@wam.umd.edu>
    6    11.3 (  4.5/  6.8/  4.8)  "J" <kestrel@mit.edu>
    5     8.8 (  5.3/  3.5/  2.8)  "Mark Shelor" <shelorm@earthlink.net>
    4    12.1 (  3.3/  8.7/  5.3)  "S Warhurst" <s.i.warhurst@rl.ac.uk>
    4     6.0 (  3.4/  2.6/  1.6)  Jongkees <robert@context.nl>
    4     9.6 (  3.8/  5.8/  3.3)  robtompc@yahoo.com
    4     6.3 (  3.4/  2.9/  1.5)  Alfred Heer <gopher@fheer.com>
    3     4.3 (  2.1/  2.1/  1.2)  "Parmeet" <parmeet@emirates.net.ae>
    3     4.7 (  2.2/  2.5/  1.0)  David Kenneally <dwk@auto-graphics.com>
    3     3.9 (  1.8/  2.1/  0.9)  "Tom Atkins" <tatkins@aug.com>

These posters accounted for 4.8% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  12.1 (  3.3/  8.7/  5.3)      4  "S Warhurst" <s.i.warhurst@rl.ac.uk>
  11.3 (  5.2/  6.1/  5.5)      6  "Mike Schmitt" <mds@wam.umd.edu>
  11.3 (  4.5/  6.8/  4.8)      6  "J" <kestrel@mit.edu>
  11.1 (  2.9/  8.2/  4.8)      3  "Kurt Stephens" <kurt.stephens@pepsdesign.com>
   9.6 (  3.8/  5.8/  3.3)      4  robtompc@yahoo.com
   9.4 (  2.2/  7.2/  6.6)      3  Tim Moose <wtmoose@yahoo.com>
   8.8 (  5.3/  3.5/  2.8)      5  "Mark Shelor" <shelorm@earthlink.net>
   6.3 (  1.8/  4.6/  3.7)      3  steve <stevet@ex-pressnet.com>
   6.3 (  3.4/  2.9/  1.5)      4  Alfred Heer <gopher@fheer.com>
   6.0 (  3.4/  2.6/  1.6)      4  Jongkees <robert@context.nl>

These posters accounted for 5.5% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.918  (  6.6 /  7.2)      3  Tim Moose <wtmoose@yahoo.com>
0.895  (  5.5 /  6.1)      6  "Mike Schmitt" <mds@wam.umd.edu>
0.876  (  2.2 /  2.6)      3  John Kenyon <johnkenyon@usa.net>
0.812  (  3.7 /  4.6)      3  steve <stevet@ex-pressnet.com>
0.784  (  2.8 /  3.5)      5  "Mark Shelor" <shelorm@earthlink.net>
0.709  (  4.8 /  6.8)      6  "J" <kestrel@mit.edu>
0.653  (  1.6 /  2.5)      3  "jennyw" <donotspam-jen@dangerousideas.com>
0.620  (  1.6 /  2.6)      4  Jongkees <robert@context.nl>
0.605  (  5.3 /  8.7)      4  "S Warhurst" <s.i.warhurst@rl.ac.uk>
0.586  (  4.8 /  8.2)      3  "Kurt Stephens" <kurt.stephens@pepsdesign.com>

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.620  (  1.6 /  2.6)      4  Jongkees <robert@context.nl>
0.605  (  5.3 /  8.7)      4  "S Warhurst" <s.i.warhurst@rl.ac.uk>
0.586  (  4.8 /  8.2)      3  "Kurt Stephens" <kurt.stephens@pepsdesign.com>
0.570  (  3.3 /  5.8)      4  robtompc@yahoo.com
0.552  (  1.2 /  2.1)      3  "Parmeet" <parmeet@emirates.net.ae>
0.504  (  1.5 /  2.9)      4  Alfred Heer <gopher@fheer.com>
0.455  (  0.9 /  2.1)      3  "Tom Atkins" <tatkins@aug.com>
0.426  (  1.0 /  2.4)      3  roger_faust@bluewin.ch
0.386  (  1.0 /  2.5)      3  David Kenneally <dwk@auto-graphics.com>
0.210  (  0.6 /  2.8)      3  "execv" <execv@hotmail.com>

17 posters (13%) had at least three posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      25  alt.perl
      17  comp.programming
      11  comp.lang.perl.moderated
       8  comp.unix.programmer
       7  comp.lang.basic.visual
       7  nyc.food
       7  comp.lang.java.programmer
       7  comp.lang.eiffel
       7  comp.lang.c++
       7  comp.object

Top 10 Crossposters
===================

Articles  Address
--------  -------

       7  "Frances Klein" <fraklein@yahoo.com>
       7  Alexandre <armence@hotmail.com>
       7  Kirsten Bayes <KirstenBayes@aol.com>
       7  no <pulse@nyc.rr.com>
       7  andrzej@chaeron.spamicide.com
       6  "Michael" <michael.stuttgart@gmx.de>
       4  tony@darkstorm.co.uk
       4  Keith Keller <kkeller@speakeasy.net>
       3  usenet-reply@stirfried.vegetable.org.uk
       3  "J" <kestrel@mit.edu>


------------------------------

Date: Mon, 19 Nov 2001 09:05:47 -0600
From: cpryce <cpryce@pryce.net>
Subject: Re: Please Kindly Help With DBI
Message-Id: <B81E7BEB.3212%cpryce@pryce.net>

in article 9t5pob$598$1@slb1.atl.mindspring.net, Alex Bright at
AlexBB2001USA@yahoo.com wrote on 11/17/01 8:00 AM:

> my $employerFile = "prog.txt";
            ^^^^   

> ### Open the data file for reading, and die upon failure
> open EMPLOYEEDATA, "<$employeeFile"
>   or die "Can't open $employeeFile: $!\n";
                             ^^^^^

This looks like a typo? Use strict should have caught it.
--
cp 



------------------------------

Date: Mon, 19 Nov 2001 15:35:03 +0100
From: "felix" <mr.thanquol@gmx.de>
Subject: Proc::Daemon-question
Message-Id: <9tb5as$ius$1@crusher.de.colt.net>

hi,

what is the easiest way to get the pid of my child process?
I use a simple script running as daemon with Proc::Daemon like

#!/usr/bin/perl
use Proc::Daemon;
Proc::Daemon::Init;
$file = '/tmp/dummy.log';
while (1){
  $num++;
  sleep 1;
  open (FILE, ">>$file");
    print FILE $num, \n";
  close;
}

thx
fe




------------------------------

Date: 19 Nov 2001 11:53:35 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: relinquishing group permissions
Message-Id: <9tarrv$4s5$2@mamenchi.zrz.TU-Berlin.DE>

According to  <nobull@mail.com>:
> "Sean Hamilton" <sh@planetquake.com> wrote in message
> news:<jh2J7.9081$c4.1481599@news0.telusplanet.net>...
> > Greetings,
> > 
> > I have a script running setuid. As soon as the user authenticates, I'm
> > calling getpwnam and setting $<, $(, $>, and $) accordingly. However, the
> > script still maintains the group permissions of its caller (Apache),
> 
> The following should work on many Unicies:
> 
> # Ugly, ugly, ugly...
> sub setgroups {
>     require 'syscall.ph';
>     syscall &SYS_setgroups, @_+0, pack("s*", @_);
> }
> 
> > and I think it may be possible for it to change its id back up to root or
> > whatever.
> 
> Not sure about that one.  I think that once both real and effective
> UID are non-root you can't change UID, GID or group memberships.

 ...unless your system supports the saved user-ID (most do).  In that
case you can switch back to a user-ID you came from.

Anno


------------------------------

Date: 19 Nov 2001 07:05:01 -0800
From: rellmoore@hotmail.com (D. Moore)
Subject: Screen Prints
Message-Id: <ff0cbb44.0111190705.6cb32d96@posting.google.com>

Is there a command or function in PERL that's equivalent to the TPUT
command in Korn Shell?


------------------------------

Date: Mon, 19 Nov 2001 14:28:10 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: separate cgi file for subroutines
Message-Id: <slrn9vi2kn.ftn.tadmc@tadmc26.august.net>

Jonah <jonah@@adtrackz.com> wrote:
>
>I want to separate the display subroutines into
>another file but they need to have access to
>the global variables declared in the main script.


Please do not keep asking the same question in separate posts/threads.

Once is enough.

Thank you.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 19 Nov 2001 04:51:52 -0800
From: nobull@mail.com
Subject: Re: Setting Cookie
Message-Id: <4dafc536.0111190451.4b87d734@posting.google.com>

wil@fbagroup.co.uk (Wiliam Stephens) wrote in message news:<39e3e00a.0111180824.7da8dcb7@posting.google.com>...
> I'm trying to use the following sub to set a cookie to the browser.
> However, for some reason the cookie never gets set and no error ever
> gets returned?
> 
> I'm calling the sub "set_cookie;" which should go and find a random
> number and then set the cookie from $randid.

I note that your set_cookie() calls CGI::header().

Are you aware that CGI::header must only be called once per CGI script
(before any other output)?


------------------------------

Date: Mon, 19 Nov 2001 15:45:35 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <tvia8v81o8rj7d@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 12 Nov 2001 16:09:05 GMT and ending at
19 Nov 2001 13:49:57 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2001 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@(?:.*\.)?perl\.com
faq\@(?:.*\.)?denver\.pm\.org

Totals
======

Posters:  292
Articles: 879 (332 with cutlined signatures)
Threads:  226
Volume generated: 1668.5 kb
    - headers:    743.8 kb (14,490 lines)
    - bodies:     874.3 kb (28,495 lines)
    - original:   566.7 kb (20,078 lines)
    - signatures: 49.6 kb (1,161 lines)

Original Content Rating: 0.648

Averages
========

Posts per poster: 3.0
    median: 1.0 post
    mode:   1 post - 169 posters
    s:      5.7 posts
Posts per thread: 3.9
    median: 3.0 posts
    mode:   3 posts - 56 threads
    s:      4.8 posts
Message size: 1943.8 bytes
    - header:     866.4 bytes (16.5 lines)
    - body:       1018.5 bytes (32.4 lines)
    - original:   660.2 bytes (22.8 lines)
    - signature:  57.8 bytes (1.3 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   52   143.6 ( 51.0/ 82.4/ 49.6)  mgjv@tradingpost.com.au
   36    67.9 ( 34.1/ 30.5/ 17.0)  tassilo.parseval@post.rwth-aachen.de
   31    59.1 ( 26.3/ 32.8/ 23.9)  "Godzilla!" <godzilla@stomp.stomp.tokyo>
   29    42.6 ( 25.1/ 17.3/ 10.5)  Bart Lateur <bart.lateur@skynet.be>
   24    50.2 ( 18.9/ 30.3/ 19.5)  Benjamin Goldberg <goldbb2@earthlink.net>
   23    60.2 ( 22.1/ 38.0/ 37.7)  "Steffen Müller" <tsee@gmx.net>
   22    41.1 ( 17.0/ 24.1/  8.5)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   19    28.7 ( 16.8/ 11.9/  6.3)  "Gregory Toomey" <nobody@nowhere.com>
   18    32.1 ( 13.1/ 18.3/ 12.6)  nobull@mail.com
   17    27.2 ( 15.6/ 11.6/  4.3)  Bernard El-Hagin <bernard.el-hagin@lido-tech.net>

These posters accounted for 30.8% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

 143.6 ( 51.0/ 82.4/ 49.6)     52  mgjv@tradingpost.com.au
  67.9 ( 34.1/ 30.5/ 17.0)     36  tassilo.parseval@post.rwth-aachen.de
  60.2 ( 22.1/ 38.0/ 37.7)     23  "Steffen Müller" <tsee@gmx.net>
  59.1 ( 26.3/ 32.8/ 23.9)     31  "Godzilla!" <godzilla@stomp.stomp.tokyo>
  50.2 ( 18.9/ 30.3/ 19.5)     24  Benjamin Goldberg <goldbb2@earthlink.net>
  43.6 ( 15.5/ 22.9/ 11.8)     17  Uri Guttman <uri@stemsystems.com>
  42.6 ( 25.1/ 17.3/ 10.5)     29  Bart Lateur <bart.lateur@skynet.be>
  41.1 ( 17.0/ 24.1/  8.5)     22  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
  36.0 ( 14.0/ 17.4/ 13.3)     15  Mark Jason Dominus <mjd@plover.com>
  34.9 (  9.4/ 23.5/ 18.4)     12  Logan Shaw <logan@cs.utexas.edu>

These posters accounted for 34.7% of the total volume.

Top 10 Posters by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.992  ( 37.7 / 38.0)     23  "Steffen Müller" <tsee@gmx.net>
0.908  (  2.0 /  2.2)      7  "Sean Hamilton" <sh@planetquake.com>
0.895  (  5.5 /  6.1)      6  "Mike Schmitt" <mds@wam.umd.edu>
0.855  (  5.2 /  6.1)      6  Wiliam Stephens <wil@fbagroup.co.uk>
0.786  ( 18.4 / 23.5)     12  Logan Shaw <logan@cs.utexas.edu>
0.784  (  2.8 /  3.5)      5  "Mark Shelor" <shelorm@earthlink.net>
0.768  ( 13.3 / 17.4)     15  Mark Jason Dominus <mjd@plover.com>
0.730  ( 23.9 / 32.8)     31  "Godzilla!" <godzilla@stomp.stomp.tokyo>
0.724  (  4.8 /  6.7)     10  BUCK NAKED1 <dennis100@webtv.net>
0.724  (  7.6 / 10.5)     10  "Alan J. Flavell" <flavell@mail.cern.ch>

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.473  (  1.8 /  3.7)      7  Laocoon <Laocoon@eudoramail.com>
0.435  (  2.3 /  5.2)      7  John J. Trammell <trammell@haqq.hypersloth.invalid>
0.435  (  2.1 /  4.7)      6  Chas Friedman <friedman@math.utexas.edu>
0.400  (  0.8 /  2.1)      5  Mona Wuerz <wuerz@yahoo.com>
0.391  (  1.6 /  4.1)      5  Paul Boardman <peb@bms.umist.ac.uk>
0.382  (  1.7 /  4.4)      6  "Jessica Bull" <jessica.bull@broadwing.com>
0.382  (  4.2 / 10.9)      8  "Geoff" <geoff@REMOVETHISgeoffball.net>
0.375  (  4.3 / 11.6)     17  Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
0.355  (  8.5 / 24.1)     22  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
0.339  (  1.5 /  4.5)      5  "Mina Naguib" <spam@thecouch.homeip.net>

38 posters (13%) had at least five posts.

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   29  Median of Three
   23  Binary issues..
   21  ranged arrays
   20  Unencoding
   16  stacked if statements
   16  RegEx problem -- trying to match To: or From: at beginning of line
   15  specific array items, loop iterator
   14  Sorting of arrays by an element of each
   13  Directory problem... again
   12  Accessing NT Network Neighbourhood

These threads accounted for 20.4% of all articles.

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  60.2 ( 25.1/ 32.8/ 22.5)     29  Median of Three
  58.6 ( 18.9/ 38.4/ 31.7)     21  ranged arrays
  53.8 ( 20.9/ 30.4/ 19.7)     23  Binary issues..
  49.9 ( 22.0/ 26.1/ 11.6)     20  Unencoding
  34.2 ( 13.6/ 19.2/ 12.4)     16  stacked if statements
  29.6 ( 10.5/ 18.8/ 11.7)     12  Accessing NT Network Neighbourhood
  29.2 ( 15.0/ 13.8/  7.4)     16  RegEx problem -- trying to match To: or From: at beginning of line
  28.8 ( 11.6/ 15.5/  9.0)      9  ebcdic, was Re: Unencoding
  26.7 ( 11.6/ 14.5/  9.0)     14  Sorting of arrays by an element of each
  26.3 ( 10.2/ 14.4/  9.4)     13  Directory problem... again

These threads accounted for 23.8% of the total volume.

Top 10 Threads by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.885  (  1.0/   1.2)      5  no more than 128 symbles
0.844  (  3.0/   3.5)      5  Reading from a hash list
0.825  ( 31.7/  38.4)     21  ranged arrays
0.804  (  3.2/   4.0)      6  Random element from array?
0.759  (  2.3/   3.0)      5  attach file
0.759  (  8.9/  11.8)      6  slicing multi dimensional arrays
0.744  (  6.5/   8.8)      8  Net::NNTP question
0.742  (  4.4/   5.9)      5  Use of another perl script in CGI
0.741  (  3.2/   4.3)      5  CGI links with a single argument
0.741  (  1.7/   2.3)      5  is there a function...

Bottom 10 Threads by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.471  (  2.5 /  5.2)      5  DBI changing from CSV to mySQL probs
0.444  ( 11.6 / 26.1)     20  Unencoding
0.437  (  3.2 /  7.4)      7  Best language for low IQ programmers?
0.433  (  1.2 /  2.7)      5  using modules in subdirectories with a dash
0.431  (  2.0 /  4.6)      6  shift operator / large numbers
0.395  (  3.1 /  7.7)      7  a good perl editor - know one??
0.379  (  1.7 /  4.4)      6  Exact match with the Regular expression
0.377  (  1.2 /  3.1)      5  reading null terminated string from a file
0.370  (  2.1 /  5.8)      5  Declare Database Handle in Main or Module
0.346  (  3.2 /  9.2)     15  specific array items, loop iterator

60 threads (26%) had at least five posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      25  alt.perl
      17  comp.programming
      11  comp.lang.perl.moderated
       8  comp.unix.programmer
       7  comp.lang.basic.visual
       7  nyc.food
       7  comp.lang.java.programmer
       7  comp.lang.eiffel
       7  comp.lang.c++
       7  comp.object

Top 10 Crossposters
===================

Articles  Address
--------  -------

       7  comeau@comeaucomputing.com
       7  no <pulse@nyc.rr.com>
       7  Alexandre <armence@hotmail.com>
       7  andrzej@chaeron.spamicide.com
       7  "Frances Klein" <fraklein@yahoo.com>
       7  nospam@nospam.com
       7  Kirsten Bayes <KirstenBayes@aol.com>
       6  "Michael" <michael.stuttgart@gmx.de>
       5  Mark Jason Dominus <mjd@plover.com>
       4  tony@darkstorm.co.uk


------------------------------

Date: Mon, 19 Nov 2001 22:01:47 +1000
From: "Gregory Toomey" <nobody@nowhere.com>
Subject: Re: temporary file deleting too soon
Message-Id: <Xt6K7.369522$8x1.112526@newsfeeds.bigpond.com>

<nobull@mail.com> wrote in message
news:4dafc536.0111190203.4b028cb9@posting.google.com...
>
> IMNSHO this is definitely the 'B' answer.  The 'A' answer is to use
> the temporary file because it is more cache-friendly.  You can, of
> course, combine the approaches and have the IMG tag call a CGI which
> creates the temporary file if it does not already exist and then
> issues a redirect to the created file.
>
> There may also be an 'A+' answer that is the same as the 'B' answer
> but with suitable Etag and Last-Modified headers so that you can avoid
> temporary files without screwing the HTTP caching mechanism.
>
> None of this, of course, has anything whatever to do with Perl.
Quite right!!

I've just implemented the 'A' answer on a stock market system I'm
developing. The HTML takes 0.3 sec to generate, but generating a stock graph
using GD & mysql can take several seconds. The HTML loads straight away on
the browser and the graphic appears a few seconds later.

Nothing to do with Perl but a useful technique.

gtoomey




------------------------------

Date: Mon, 19 Nov 2001 14:41:15 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: temporary file deleting too soon
Message-Id: <Pine.LNX.4.30.0111191350380.4503-100000@lxplus023.cern.ch>

On Nov 19, nobull@mail.com inscribed on the eternal scroll:

> > After testing I found you need to: print "Content-Type: image-gif\n\n"  then
> > just write the gif to stdout.
>
> IMNSHO this is definitely the 'B' answer.  The 'A' answer is to use
> the temporary file because it is more cache-friendly.  You can, of
> course, combine the approaches and have the IMG tag call a CGI which
> creates the temporary file if it does not already exist and then
> issues a redirect to the created file.

There's certainly a good point in what you say, but (at risk of
stating the obvious!) on the one hand if the result is dynamic then it
might not be such a good idea to make it cacheable, whereas on the
other hand if the result _is_ to be considered cacheable then the CGI
script can write appropriate headers to say so, for example an Expires
header.  My favourite tutorials on this issue are
http://www.mnot.net/cache_docs/ , and he has a section devoted to how
to write cache-friendly CGIs.

> There may also be an 'A+' answer that is the same as the 'B' answer
> but with suitable Etag and Last-Modified headers so that you can avoid
> temporary files without screwing the HTTP caching mechanism.

This is an interesting point, though maybe straying too far off topic
for clpm.

> None of this, of course, has anything whatever to do with Perl.

x-posted and f'ups set (I hope)




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.

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 V10 Issue 2156
***************************************


home help back first fref pref prev next nref lref last post