[29694] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 938 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 15 21:09:44 2007

Date: Mon, 15 Oct 2007 18:09: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           Mon, 15 Oct 2007     Volume: 11 Number: 938

Today's topics:
    Re: a nice little perl utility <Cloink_Friggson@ntlworld.com>
    Re: a nice little perl utility <rkb@i.frys.com>
    Re: a nice little perl utility <jgibson@mail.arc.nasa.gov>
    Re: a nice little perl utility <bik.mido@tiscalinet.it>
    Re: Desperately need help for html to LaTeX conversion <bik.mido@tiscalinet.it>
    Re: Perl 5.8 and MD5 <jruffino@gailborden.info>
    Re: Perl 5.8 and MD5 <jruffino@gailborden.info>
    Re: Perl 5.8 and MD5 <glex_no-spam@qwest-spam-no.invalid>
    Re: Perl 5.8 and MD5 <glex_no-spam@qwest-spam-no.invalid>
    Re: Perl 5.8 and MD5 <glex_no-spam@qwest-spam-no.invalid>
    Re: Perl 5.8 and MD5 <paduille.4061.mumia.w+nospam@earthlink.net>
    Re: Perl 5.8 and MD5 <jruffino@gailborden.info>
    Re: Perl 5.8 and MD5 <rkb@i.frys.com>
    Re: Perl 5.8 and MD5 <rkb@i.frys.com>
    Re: Perl 5.8 and MD5 <rkb@i.frys.com>
    Re: Perl 5.8 and MD5 <elvis-85473@notatla.org.uk>
    Re: Strong Blog CGI in Perl <izidoor@invalid.com>
        Where can I get mod_perl binary for Win32 for Apache 2. <nn@nomail.org>
    Re: Where can I get mod_perl binary for Win32 for Apach <ben@morrow.me.uk>
    Re: Where can I get mod_perl binary for Win32 for Apach <nn@nomail.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 15 Oct 2007 14:58:17 -0700
From:  Cloink <Cloink_Friggson@ntlworld.com>
Subject: Re: a nice little perl utility
Message-Id: <1192485497.948183.223620@i13g2000prf.googlegroups.com>

> In addition to "activating" that line in the conf file, you could also
> make a registry entry that assures that Perl will run all .cgi scripts
> (without having to have a file type association) and will run in taint
> mode.

What on earth is 'taint' mode? I'm a perl scaredy cat, I know only the
essentials.

"perldoc [-q] taint" doesn't tell me much.

Thanks for the other advice.

Oh and how does one turn quoted text into one of those "- Show quoted
text -" links? Google's help didn't offer any obvious explanations.

Cheers.



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

Date: Mon, 15 Oct 2007 22:25:58 -0000
From:  Ron Bergin <rkb@i.frys.com>
Subject: Re: a nice little perl utility
Message-Id: <1192487158.169426.210190@v29g2000prd.googlegroups.com>

On Oct 15, 2:58 pm, Cloink <Cloink_Frigg...@ntlworld.com> wrote:
> > In addition to "activating" that line in the conf file, you could also
> > make a registry entry that assures that Perl will run all .cgi scripts
> > (without having to have a file type association) and will run in taint
> > mode.
>
> What on earth is 'taint' mode? I'm a perl scaredy cat, I know only the
> essentials.
>
> "perldoc [-q] taint" doesn't tell me much.
>
> Thanks for the other advice.

http://perldoc.perl.org/perlsec.html
http://www.google.com/search?q=perl+taint+mode&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

>
> Oh and how does one turn quoted text into one of those "- Show quoted
> text -" links? Google's help didn't offer any obvious explanations.
>
> Cheers.

It probably depends on your interface.  I'm using google's web
interface and simply click on the Reply link.



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

Date: Mon, 15 Oct 2007 15:49:16 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: a nice little perl utility
Message-Id: <151020071549166486%jgibson@mail.arc.nasa.gov>

In article <1192485497.948183.223620@i13g2000prf.googlegroups.com>,
Cloink <Cloink_Friggson@ntlworld.com> wrote:

> > In addition to "activating" that line in the conf file, you could also
> > make a registry entry that assures that Perl will run all .cgi scripts
> > (without having to have a file type association) and will run in taint
> > mode.

It is nicer to include all attributions so we could tell who wrote the
above (it was Ron Bergin.)

> 
> What on earth is 'taint' mode? I'm a perl scaredy cat, I know only the
> essentials.
> 
> "perldoc [-q] taint" doesn't tell me much.

perldoc perlsec

or Google for 'perl taint mode'.

> Thanks for the other advice.

(Can't tell whom you are thanking without attributions.)

-- 
Jim Gibson

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------        
                http://www.usenet.com


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

Date: Tue, 16 Oct 2007 00:50:47 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: a nice little perl utility
Message-Id: <mhr7h3hva75mdc0jmarm66374qq3l3a0jc@4ax.com>

On Mon, 15 Oct 2007 14:58:17 -0700, Cloink
<Cloink_Friggson@ntlworld.com> wrote:

>What on earth is 'taint' mode? I'm a perl scaredy cat, I know only the
>essentials.
>
>"perldoc [-q] taint" doesn't tell me much.

perldoc perlsec

>Oh and how does one turn quoted text into one of those "- Show quoted
>text -" links? Google's help didn't offer any obvious explanations.

IIUC that's a little bit of AJAX related to presentation of text, but
you don't want to do what you want even if it were possible: clpmisc
is not a web forum, and GG is only an interface to it.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Mon, 15 Oct 2007 21:54:31 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Desperately need help for html to LaTeX conversion
Message-Id: <35h7h3hqsr8akq9l92gqirjijl12nppcg1@4ax.com>

On Mon, 15 Oct 2007 18:01:40 -0000, vasan999@hotmail.com wrote:

>The perl one does not run due to path problems.

Since this is probably the only line vaguely IT in clpmisc, to make it
*really* IT, you should point us to what the hell "the perl one" is
and how it exactly fails to run. And even then it wouldn't be fully
IT, because we generally discuss Perl here, not software that happens
to be written in Perl. But in all earnestness there are some chances
that if you take the above steps someone will be able to help you.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Mon, 15 Oct 2007 13:47:00 -0700
From:  Joe <jruffino@gailborden.info>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192481220.922694.92760@v23g2000prn.googlegroups.com>

Here is the revided script using strict with no line numbers

#!/usr/bin/perl

use Digest::MD5 qw(md5_hex);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);	# Module for
sending error message to browser.
use CGI qw(:standard :html3);		# Module for using HTML Code
use strict;

#Libarry file that will read the form data and store in
formdata{'value'} form
require '../lib/forminput.lib';

&FormInput;

my %formdata;

print "HTTP/1.0 200 OK\n" if ($ENV{PERLXS} eq "PerlIS");
print "Content-Type: text/html\n\n";

print qq(<html><head><title>MD5 Encryption</title></head><body>);

if ($formdata{'flag'} eq "1") {
print qq(
Encryption
<br />
<br />
$formdata{'toEncrypt'} = );

print md5_hex($formdata{'toEncrypt'})

}
else {

print qq(
<form action="md5.cgi?flag=1" method="post">
Text to Encrypt: <input type="text" name="toEncrypt">
<br />
<br />
<input type="submit" value="Encrypt">

</form>
);

}

print qq(</body></html>);

Also, this program was written by someone else, I normally use
strict.  The &FormInput input is from that person writing, it never
seemed to bother the programs I would modify, so I left 'em in.
Formdata is like using param().  And, YES, I did take it out, wioth
the library line, and it made no difference at all.

Even with the additions I still get the "script produced no output".

The program is run but going here: http://gailbapps/cgi-bin/md5/md5.cgi

Gailbapps is our Win 2003 Sever that has Perl 5.8 installed on it.  I
am reading thru that link that was sent to me now.



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

Date: Mon, 15 Oct 2007 13:55:30 -0700
From:  Joe <jruffino@gailborden.info>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192481730.856533.126160@v23g2000prn.googlegroups.com>

I ran it from the cmd line, with the use diagnostics; line for that
page, and in the Perl log, I get:

PerlParse did not exit clean!  I tried looking that up through google,
and it lead me to MD5 last week.



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

Date: Mon, 15 Oct 2007 16:36:19 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Perl 5.8 and MD5
Message-Id: <4713dd53$0$515$815e3792@news.qwest.net>

Joe wrote:
> I ran it from the cmd line, with the use diagnostics; line for that
> page, and in the Perl log, I get:
> 
> PerlParse did not exit clean!  I tried looking that up through google,
> and it lead me to MD5 last week.
> 

Look through your forminput.lib.



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

Date: Mon, 15 Oct 2007 16:44:25 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Perl 5.8 and MD5
Message-Id: <4713df3a$0$496$815e3792@news.qwest.net>

Joe wrote:
> Here is the revided script using strict with no line numbers
> 
> #!/usr/bin/perl
> 
> use Digest::MD5 qw(md5_hex);
> use CGI::Carp qw(warningsToBrowser fatalsToBrowser);	# Module for
> sending error message to browser.
> use CGI qw(:standard :html3);		

Why aren't you using the methods available to you?

perldoc CGI

> 
> Also, this program was written by someone else, I normally use
> strict.  

Then maybe 'someone else' should help you.


 >The &FormInput input is from that person writing, it never
> seemed to bother the programs I would modify, so I left 'em in.
> Formdata is like using param().  And, YES, I did take it out, wioth
> the library line, and it made no difference at all.
> 
> Even with the additions I still get the "script produced no output".

Then start with a basic script.. e.g.

% cat mytest.cgi.
#!/usr/bin/perl
use CGI qw( :standard );
print header, start_html( 'testing' ), p('does this work?'), end_html;


If that works, then add a line or two at a time.  If it doesn't
then you need to figure out how to configure your Web server
correctly.


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

Date: Mon, 15 Oct 2007 16:56:55 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Perl 5.8 and MD5
Message-Id: <4713e227$0$10307$815e3792@news.qwest.net>

Joe wrote:
> I ran it from the cmd line, with the use diagnostics; line for that
> page, and in the Perl log, I get:
> 
> PerlParse did not exit clean!  I tried looking that up through google,
> and it lead me to MD5 last week.
> 

Maybe this might help:

http://bugs.activestate.com/show_bug.cgi?id=40576


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

Date: Mon, 15 Oct 2007 16:29:58 -0500
From: "Mumia W." <paduille.4061.mumia.w+nospam@earthlink.net>
Subject: Re: Perl 5.8 and MD5
Message-Id: <13h7q70m9v5jr3a@corp.supernews.com>

On 10/15/2007 03:47 PM, Joe wrote:
> Here is the revided script using strict with no line numbers
> 
> #!/usr/bin/perl
> 
> use Digest::MD5 qw(md5_hex);
> use CGI::Carp qw(warningsToBrowser fatalsToBrowser);	# Module for
> sending error message to browser.
> use CGI qw(:standard :html3);		# Module for using HTML Code
> use strict;
> 
> #Libarry file that will read the form data and store in
> formdata{'value'} form
> require '../lib/forminput.lib';
> 
> &FormInput;
> 
> my %formdata;
> [...]

This line creates a new lexical variable named formdata that hides the 
old variable formdata that had been created by forminput.lib. Do this 
instead:

our %formdata;

It's good you posted a somewhat complete program to test. In the process 
of trying to get your program to work, I discovered this.

For more good ideas for getting good help out of this newsgroup, read 
the posting guidelines:

http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

BTW, it's spelled "library."


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

Date: Mon, 15 Oct 2007 15:27:28 -0700
From:  Joe <jruffino@gailborden.info>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192487248.859647.276660@e9g2000prf.googlegroups.com>

I don't want to make excuses, but, the 'someone else' who wrote some
of the scripts that do not work died in a motorcycle accident about a
year back who was never big on documentation, a cardianl sin I know.
Also, Perl was installed by our Network Administrator with that
persons help.  When I ask the Network Admin about it, I get a 'I Don't
Know'  I get the run around about reinstalling, but he says NO.

I just need some, possible, hints on how to do this that may work.  I
have no idea how to configure a web server, but, this is where my
understanding lacks alot.  I am a Help Desk/Programmer who just writes
what I am told too..everything has been in place from the get go for
me.

If anyone knows a way for me to explain how to reconfigure Perl to
work with MD5, I'm all eyes and ears.  I am told not to touch Servers,
it is not my job.  I just write and maintain programs on them.



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

Date: Mon, 15 Oct 2007 22:57:44 -0000
From:  Ron Bergin <rkb@i.frys.com>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192489064.177619.286760@z24g2000prh.googlegroups.com>

On Oct 15, 1:47 pm, Joe <jruff...@gailborden.info> wrote:
> Here is the revided script using strict with no line numbers
>
> #!/usr/bin/perl
>
> use Digest::MD5 qw(md5_hex);
> use CGI::Carp qw(warningsToBrowser fatalsToBrowser);    # Module for
> sending error message to browser.
> use CGI qw(:standard :html3);           # Module for using HTML Code
Why do you load the CGI module, but never use it?

> use strict;
>
> #Libarry file that will read the form data and store in
> formdata{'value'} form
> require '../lib/forminput.lib';
>
> &FormInput;
>
> my %formdata;

Get rid of that library, I'm sure it's using outdated and poorly
written code, and instead use the methods provided by the CGI module.

#!/usr/bin/perl

use strict;
use CGI;
use Digest::MD5 qw(md5_hex);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser); # used while
debugging

my $cgi = CGI->new;
my %formdata = $cgi->Vars;

>
> print "HTTP/1.0 200 OK\n" if ($ENV{PERLXS} eq "PerlIS");
> print "Content-Type: text/html\n\n";
>
> print qq(<html><head><title>MD5 Encryption</title></head><body>);

I say again, use the CGI module.

print $cgi->header, $cgi->start_html('MD5 Encryption');
warningsToBrowser(1);
>
> if ($formdata{'flag'} eq "1") {
> print qq(
> Encryption
> <br />
> <br />
> $formdata{'toEncrypt'} = );
>
> print md5_hex($formdata{'toEncrypt'})
>
> }
>
> else {
>
> print qq(
> <form action="md5.cgi?flag=1" method="post">
> Text to Encrypt: <input type="text" name="toEncrypt">
> <br />
> <br />
> <input type="submit" value="Encrypt">
>
> </form>
> );
>
> }
>
> print qq(</body></html>);

Instead of me rewriting your script for you, you should read the
documentation for the CGI module.
http://search.cpan.org/~lds/CGI.pm-3.29/CGI.pm



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

Date: Mon, 15 Oct 2007 23:13:29 -0000
From:  Ron Bergin <rkb@i.frys.com>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192490009.823380.202610@e34g2000pro.googlegroups.com>

On Oct 15, 3:27 pm, Joe <jruff...@gailborden.info> wrote:
>
> If anyone knows a way for me to explain how to reconfigure Perl to
> work with MD5, I'm all eyes and ears.  I am told not to touch Servers,
> it is not my job.  I just write and maintain programs on them.

Paul already provided the info ( which was perldoc -q installed ) that
points to the documentation on how find out what modules are
installed, buts here's an example on how to test if the Digest::MD5
module is installed.

Executed from the command line:

perl -MDigest::MD5 -e 1

If you don't receive any output, then that means that the module is
installed.

If you receive an error message telling you that it can't find the
module, then either it's not installed, or it may have been
incorrectly installed.



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

Date: Mon, 15 Oct 2007 23:26:07 -0000
From:  Ron Bergin <rkb@i.frys.com>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192490767.700130.86550@v23g2000prn.googlegroups.com>

On Oct 15, 3:57 pm, Ron Bergin <r...@i.frys.com> wrote:
> On Oct 15, 1:47 pm, Joe <jruff...@gailborden.info> wrote:> Here is the revided script using strict with no line numbers
>
[snip]
>
> use the methods provided by the CGI module.
>
> #!/usr/bin/perl
>
> use strict;
> use CGI;
> use Digest::MD5 qw(md5_hex);
> use CGI::Carp qw(warningsToBrowser fatalsToBrowser); # used while
> debugging
>
I noticed that I forgot 1 module.

use warnings;



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

Date: 15 Oct 2007 23:51:38 GMT
From: all mail refused <elvis-85473@notatla.org.uk>
Subject: Re: Perl 5.8 and MD5
Message-Id: <slrnfh7urq.540.elvis-85473@notatla.org.uk>

On 2007-10-15, Joe <jruffino@gailborden.info> wrote:
> I don't want to make excuses, but, the 'someone else' who wrote some
> of the scripts that do not work died in a motorcycle accident about a
> year back who was never big on documentation, a cardianl sin I know.
> Also, Perl was installed by our Network Administrator with that
> persons help.  When I ask the Network Admin about it, I get a 'I Don't
> Know'  I get the run around about reinstalling, but he says NO.
>
> I just need some, possible, hints on how to do this that may work.  I
> have no idea how to configure a web server, but, this is where my

There's always the option of telling the boss you can't do it and asking
him to give the task to someone else.  If not overused it works fine.

-- 
Elvis Notargiacomo  master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/


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

Date: Tue, 16 Oct 2007 00:28:30 +0200
From: Izidoor <izidoor@invalid.com>
Subject: Re: Strong Blog CGI in Perl
Message-Id: <MPG.217e07f57b46f583989967@news.tiscali.fr>

In article <8367h31vs88dhdl3h1pqkninnkqnadbi6l@4ax.com>, 
bik.mido@tiscalinet.it says...
> I suppose you're not a native English speaker 
> 

Effectively :)

I've also found this which list a lot of weblog Perl CGI scripts : 
http://www.hotscripts.com/CGI_and_Perl/Scripts_and_Programs/Blog/index.h
tml


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

Date: Mon, 15 Oct 2007 17:29:21 -0400
From: nn <nn@nomail.org>
Subject: Where can I get mod_perl binary for Win32 for Apache 2.2.6?
Message-Id: <13h7mtflp5qjc7c@corp.supernews.com>

I run Apache 2.2.6 on WinXP and I would need the mod_perl module binary 
for this version of Apache. Is it available anywhere?

(I read somewhere that there might be a compatibility problem of 
mod_perl 2.0 and Apache 2.2.6. True? Anyway, on the web I only found 
binaries for Apache 2.0.)

Thanks.
--nn


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

Date: Mon, 15 Oct 2007 23:05:40 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Where can I get mod_perl binary for Win32 for Apache 2.2.6?
Message-Id: <kq4du4-rge1.ln1@osiris.mauzo.dyndns.org>


Quoth nn <nn@nomail.org>:
> I run Apache 2.2.6 on WinXP and I would need the mod_perl module binary 
> for this version of Apache. Is it available anywhere?

From http://perl.apache.org/docs/2.0/os/win32/install.html:
| The direct way to install mod_perl via ppm is simply as [...]
|
|  C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd
|
| for Apache/2.2,

If you aren't using ActivePerl you can presumably build it yourself.

Ben



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

Date: Mon, 15 Oct 2007 18:41:54 -0400
From: nn <nn@nomail.org>
Subject: Re: Where can I get mod_perl binary for Win32 for Apache 2.2.6?
Message-Id: <13h7r5g5tb3jpab@corp.supernews.com>

On 10/15/2007 6:05 PM, Ben Morrow wrote:
> Quoth nn <nn@nomail.org>:
>> I run Apache 2.2.6 on WinXP and I would need the mod_perl module binary 
>> for this version of Apache. Is it available anywhere?
> 
> From http://perl.apache.org/docs/2.0/os/win32/install.html:
> | The direct way to install mod_perl via ppm is simply as [...]
> |
> |  C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd
> |
> | for Apache/2.2,
> 
> If you aren't using ActivePerl you can presumably build it yourself.
> 
> Ben
> 

Ah, okay, got it. Thanks!


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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 938
**************************************


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