[17187] in Perl-Users-Digest
Perl-Users Digest, Issue: 4599 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 12 18:10:47 2000
Date: Thu, 12 Oct 2000 15:10:24 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <971388624-v9-i4599@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 12 Oct 2000 Volume: 9 Number: 4599
Today's topics:
Re: Japanese Girl Has PERL Request. <anmcguire@my-deja.com>
Re: Japanese Girl Has PERL Request. (NP)
Re: Japanese Girl Has PERL Request. <jeff@vpservices.com>
Re: Japanese Girl Has PERL Request. (Brett W. McCoy)
Re: Japanese Girl Has PERL Request. <anmcguire@ce.mediaone.net>
Re: Japanese Girl Has PERL Request. <gopalan@cse.sc.edu>
Re: K-Shell to PERL converter <theaney@toadmail.toad.net>
Re: K-Shell to PERL converter <anmcguire@ce.mediaone.net>
New to Perl... a question or two <ChuckChopp@rtfmcsi.com>
Re: New to Perl... a question or two (Brett W. McCoy)
Newbie: Debugger error <ana.dominguez@centurytel.com>
Re: Odd number of elements in hash list ... huh? <dr@darkrabbit.com>
Re: Odd number of elements in hash list ... huh? <dave@dave.org.uk>
OOP- Abstract Derived Classes ? <joe+usenet@sunstarsys.com>
Parsing form parameters using $$ <arancj@yahoo.com>
Re: Parsing form parameters using $$ (Bernard El-Hagin)
Re: Parsing form parameters using $$ <dwilgaREMOVE@mtholyoke.edu>
Re: Parsing form parameters using $$ (Brett W. McCoy)
Re: passing and returning hashes <lr@hpl.hp.com>
Re: Perl and Filemaker <kmetcalf@NOTlighthouseNOTmarketingNOT.com>
Re: Perl and Filemaker <jeff@vpservices.com>
perl cgi-bin error problem - beginner abevec@my-deja.com
Re: perl cgi-bin error problem - beginner micah26@my-deja.com
Re: perl cgi-bin error problem - beginner abevec@my-deja.com
Re: perl cgi-bin error problem - beginner <tony_curtis32@yahoo.com>
Re: perl cgi-bin error problem - beginner micah26@netscape.net
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 12 Oct 2000 19:03:48 GMT
From: Andrew N McGuire <anmcguire@my-deja.com>
Subject: Re: Japanese Girl Has PERL Request.
Message-Id: <8s51ug$uf4$1@nnrp1.deja.com>
In article <brian-ya02408000R1210001318430001@news.panix.com>,
brian@smithrenaud.com (brian d foy) wrote:
> In article <Pine.LNX.4.21.0010121115590.19951-
100000@hawk.ce.mediaone.net>, "Andrew N. McGuire "
<anmcguire@ce.mediaone.net> posted:
>
> > On Thu, 12 Oct 2000, Kaori Ayn Honeywell quoth:
>
> > KAH> Can someone please send me the PERL code
> > KAH> that I need to interface the form with the Access
> > KAH> database to make this work?
>
> > So you want us to provide programs and documentation for your porn
> > site? I don't think so.
>
> you should thank porn site operators. they are the ones that
> push the technology. seriously. you should see some of the
> network setups the big sites have. they push a serious amount
> of bits.
I don't doubt that.
> however, there is no reason why anyone should be locked out of
> using Perl, unless you think freedom (whether libre or no-cost)
> is something reserved for linux weenies.
I believe that she has the right to use Perl (its free).
She has the right to post here.
She even has the right to disregard the NG customs and ask
for handouts for her pornsite without showing one piece of
code...
and I have the right to plonk her, and that is just what I did.
> [ gees, after Perl Mongers maybe i should start the PCLU ;) ]
OK, I am stupid, what is the PCLU? :-)
[ aside: again I had to reply from deja, as the article is
not available on my news server, sorry ]
Best Regards,
anm
--
$ENV{PAGER} = 'perl -wpe0';
system perldoc => '-t', '-F', $0;
=head1 Just Another Perl Hacker
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 12 Oct 2000 19:21:02 GMT
From: nvp@spamnothanks.speakeasy.org (NP)
Subject: Re: Japanese Girl Has PERL Request.
Message-Id: <yaoF5.23598$UP5.387560@news6.giganews.com>
anmcguire@my-deja.com wrote:
:
: OK, I am stupid, what is the PCLU? :-)
What's the ACLU? The PCLU would be the ACLU for Perl, I presume.
--
Nate II
------------------------------
Date: Thu, 12 Oct 2000 12:26:40 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Japanese Girl Has PERL Request.
Message-Id: <39E61070.3AA7D84E@vpservices.com>
NP wrote:
>
> anmcguire@my-deja.com wrote:
> :
> : OK, I am stupid, what is the PCLU? :-)
>
> What's the ACLU? The PCLU would be the ACLU for Perl, I presume.
ACLU, for our international members, is the American Civil Liberties
Union, an organization that protects the right to free speech in the
USA.
PCLU are those fine folks who allowed the Java/Python march in Skokie
even though they disagreed on the poor choice of languages. The PCLU
has its limits though, even they are unwilling to defend the rights of
VBscripters to march anywhere.
--
Jeff
------------------------------
Date: Thu, 12 Oct 2000 19:53:58 GMT
From: bmccoy@chapelperilous.net (Brett W. McCoy)
Subject: Re: Japanese Girl Has PERL Request.
Message-Id: <slrn8uc5pf.g7m.bmccoy@chapelperilous.net>
On Thu, 12 Oct 2000 12:26:40 -0700, Jeff Zucker <jeff@vpservices.com> wrote:
> PCLU are those fine folks who allowed the Java/Python march in Skokie
> even though they disagreed on the poor choice of languages. The PCLU
> has its limits though, even they are unwilling to defend the rights of
> VBscripters to march anywhere.
That'd be like shooting fish in a barrel... oops, I've said too much
already!
--
Brett W. McCoy
http://www.chapelperilous.net
---------------------------------------------------------------------------
Never worry about theory as long as the machinery does what it's supposed to do.
-- R. A. Heinlein
------------------------------
Date: Thu, 12 Oct 2000 14:59:37 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: Japanese Girl Has PERL Request.
Message-Id: <Pine.LNX.4.21.0010121455010.19972-100000@hawk.ce.mediaone.net>
On Thu, 12 Oct 2000, NP quoth:
N> anmcguire@my-deja.com wrote:
N> :
N> : OK, I am stupid, what is the PCLU? :-)
N>
N> What's the ACLU? The PCLU would be the ACLU for Perl, I presume.
Ohh. Perl Civil Liberties Union, I really can be obtuse sometimes. :-)
anm
--
perl -lwMstrict -e ' # Jim Menard -> Wyzelli -> Andrew N. McGuire
for$;(reverse++$|..100){$:=$;==$|?q++:"s";$@="bottle";$_=(q\e\x2)."l"x2**1
;m?(..)$?,;$$=" on";print$;=>v32,"$@$:".v32,"of b$`r".$$." th$`\b wa$1,"=>
v10."$; $@$: of b$`r,\012tak$`\b$$"."e down, pass it around,",q&&;$;--;$:=
$;==$|?$!:q-s-=>;print"$; $@$:$$\bf b$`r",$$." the wa$1\n"}print q#*burp*#
'
------------------------------
Date: Thu, 12 Oct 2000 17:02:09 -0400
From: Gopi Sundaram <gopalan@cse.sc.edu>
Subject: Re: Japanese Girl Has PERL Request.
Message-Id: <Pine.GSO.4.21.0010121700470.16518-100000@rigel.cs.sc.edu>
On Thu, 12 Oct 2000, NP wrote:
> What's the ACLU? The PCLU would be the ACLU for Perl, I presume.
Oh. I had presumed for the pornographers.
--
Gopi Sundaram
gopi@cs.sc.edu
------------------------------
Date: 12 Oct 2000 14:23:22 -0400
From: Tim Heaney <theaney@toadmail.toad.net>
Subject: Re: K-Shell to PERL converter
Message-Id: <87hf6hudet.fsf@susie.watterson>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>
> Beware - the original release date was April 1st. :)
It looks to me like the release date was 31st March 1999
http://search.cpan.org/search?mode=dist&query=sh2perl
Is this part of the joke? (Sure, it's all fun and games 'til someone
puts an eye out. :)
For a straight answer, the original poster could consult the FAQ
perldoc -q 'How can I convert my shell script to perl?'
Tim
------------------------------
Date: Thu, 12 Oct 2000 14:36:33 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: K-Shell to PERL converter
Message-Id: <Pine.LNX.4.21.0010121432580.19972-100000@hawk.ce.mediaone.net>
On Thu, 12 Oct 2000, nandagopalj@hotmail.com quoth:
> Hello:
>
> Does anyone know of a freeware to convert k-shell
> scripts into PERL?
> Your help is appreciated.
Your brain. No, seriously, there are many problems in porting a shell
script to perl. However you could check out Randal L. Schwartz's
world famous sh2perl translator. :-) It can be easily adapted to use
ksh.
anm
--
perl -lwMstrict -e ' # Jim Menard -> Wyzelli -> Andrew N. McGuire
for$;(reverse++$|..100){$:=$;==$|?q++:"s";$@="bottle";$_=(q\e\x2)."l"x2**1
;m?(..)$?,;$$=" on";print$;=>v32,"$@$:".v32,"of b$`r".$$." th$`\b wa$1,"=>
v10."$; $@$: of b$`r,\012tak$`\b$$"."e down, pass it around,",q&&;$;--;$:=
$;==$|?$!:q-s-=>;print"$; $@$:$$\bf b$`r",$$." the wa$1\n"}print q#*burp*#
'
------------------------------
Date: Thu, 12 Oct 2000 17:45:01 -0400
From: Chuck Chopp <ChuckChopp@rtfmcsi.com>
Subject: New to Perl... a question or two
Message-Id: <39E630DD.EE29728B@rtfmcsi.com>
I'm just starting to do some work with Perl and I have a question or
two.
I work primarily on the Win32 platform but I'll also be doing some work
on Linux.
What would be the best freeware, shareware or commercial Perl
implementation to work with?
I looked at ActiveState's Perl implementation and downloaded it to test
with, but I wanted to know if I should be looking at any other
implementations, too.
TIA,
Chuck
--
Chuck Chopp
ChuckChopp@rtfmcsi.com http://www.rtfmcsi.com
ICQ # 22321532
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651 800 400 4935 pager
8004004935@alphapage.airtouch.com
------------------------------
Date: Thu, 12 Oct 2000 21:50:04 GMT
From: bmccoy@chapelperilous.net (Brett W. McCoy)
Subject: Re: New to Perl... a question or two
Message-Id: <slrn8uccmq.g7m.bmccoy@chapelperilous.net>
On Thu, 12 Oct 2000 17:45:01 -0400, Chuck Chopp <ChuckChopp@rtfmcsi.com> wrote:
> I looked at ActiveState's Perl implementation and downloaded it to test
> with, but I wanted to know if I should be looking at any other
> implementations, too.
That's probably your best place to start. It's the most complete Win32
implementation, AFAIK. The Perl implementation that is included with
every distribution I have ever used under Linux is the 'official' stock
Perl distribution you can get through CPAN or from www.perl.com, so you
should stick with that if you are doing Linux Perl development.
Brett W. McCoy
http://www.chapelperilous.net
---------------------------------------------------------------------------
One organism, one vote.
------------------------------
Date: Thu, 12 Oct 2000 13:45:15 -0500
From: Ana Dominguez <ana.dominguez@centurytel.com>
Subject: Newbie: Debugger error
Message-Id: <39E606BB.CDD07755@centurytel.com>
This is a multi-part message in MIME format.
--------------B349305EB8E8F81A4D89CA77
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I am just trying my "hello world" program in my Unix environment.
If I run the Perl script from the debugger with the -d option, I get an
error as shown below. If I don't include the -d option, the program just
prints the phrase I requested. What is the difference here? I have a
couple of other small programs that I have run just by calling the
script name at the prompt and it gets executed, however, if I run it
from the debugger, I get even syntax errors. I believe I am totally
misunderstanding something here but need some help.
Also, if I try to do a use lib "/usr/local/lib/", I get an error from
the compiler.
Any pointers will be greatly appreciated.
The program:
$ more hello.pl
#!/usr/local/bin/perl -w
print ("Hello, world!\n");
Execution:
$ perl hello.pl
Hello, world!
No execution due to error:
$ perl -d hello.pl
Can't locate perldb.pl in @INC.
Execution:
$ hello.pl
Hello, world!
--
Ana
--------------B349305EB8E8F81A4D89CA77
Content-Type: text/x-vcard; charset=us-ascii;
name="ana.dominguez.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ana Dominguez
Content-Disposition: attachment;
filename="ana.dominguez.vcf"
begin:vcard
n:Domínguez;Ana
tel;fax:318-340-5897
tel;work:318-340-5355
x-mozilla-html:FALSE
org:CenturyTel;Information Systems
adr:;;;;;;
version:2.1
email;internet:ana.dominguez@centurytel.com
fn:Ana Domínguez
end:vcard
--------------B349305EB8E8F81A4D89CA77--
------------------------------
Date: Thu, 12 Oct 2000 12:17:11 -0500
From: Glenn Tillema <dr@darkrabbit.com>
Subject: Re: Odd number of elements in hash list ... huh?
Message-Id: <39E5F217.5040508@darkrabbit.com>
Dave Cross wrote:
>
> Not if you do also change the connect call to \%attr instead of just %attr.
No, I still get the error.
> You really should read something on Perl data structures and references.
Perldoc isn't installed on these servers, I use 'Programming Perl' and
'Perl Cookbook' as references. Any suggestions on what else I should get?
> I recommend perldoc perlreftut and perldoc perldsc
>
> Cheers,
>
> Dave...
Thanks for your help!
Glenn
------------------------------
Date: Thu, 12 Oct 2000 19:50:44 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: Odd number of elements in hash list ... huh?
Message-Id: <kt1cus097bq8ksekv42dbbgvf97lbb015m@4ax.com>
On Thu, 12 Oct 2000 12:17:11 -0500, Glenn Tillema <dr@darkrabbit.com>
wrote:
>Perldoc isn't installed on these servers, I use 'Programming Perl' and
>'Perl Cookbook' as references. Any suggestions on what else I should get?
Your perl installation is seriously broken then and you shouldn't
expect anything to work. Either reinstall Perl of complain loudly to
someone who has authority to do so.
In the meantime you can access all of the Perl docs online at
<http://www.perldoc.com>.
Cheers,
Dave...
--
<http://www.dave.org.uk> SMS: sms@dave.org.uk
------------------------------
Date: 12 Oct 2000 16:46:40 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: OOP- Abstract Derived Classes ?
Message-Id: <m3pul5bxe7.fsf@mumonkan.sunstarsys.com>
I'd like so setup a module whose job is to
add/override a particular object method;
the problem is that I don't a'priori know what
base class the object will be in. What I thought
I'd try is something like this:
package My::SubClass;
sub new {
my ($type, $base_instance) = @_;
my $class = ref($type) || $type;
local @ISA = (ref $base_instance); # !!!!!
bless $base_instance, $class;
}
sub method {
# subroutine to 'add/override' that of base class
...
}
1;
__END__
#!/usr/bin/perl -wT
use Some::BasePackageA;
ues Some::BasePackegeB;
my $A = Some::BasePackageA->new;
my $B = Some::BasePackageA->new;
my $a = My::SubClass->new($A);
my $b = My::SubClass->new($B); # does this change the base class of $a?
...
Based on how I think @ISA works,
I have a feeling that this naive approach
not going to work-
does anyone have a better way?
TIA.
--
Joe Schaefer
------------------------------
Date: Thu, 12 Oct 2000 19:10:04 -0000
From: <arancj@yahoo.com>
Subject: Parsing form parameters using $$
Message-Id: <suc34cooka375e@corp.supernews.com>
I want to make a generic form function that takes a parameter from a form
(ie. "email") and creates a variable named $email which has a value equal
to $p->param($email). To do this I created the following code.
use CGI;
my $q = new CGI;
my( $name, $value );
foreach $name ( $q->param ){ #ie $name = email
foreach $value( $q->param($name)){ #ie $value = arancj@yahoo.com
$$name = $value; #ie $email = arancj@yahoo.com
}
}
print "$email"; #should print arancj@yahoo.com but it doesn't
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
Date: 12 Oct 2000 19:16:53 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Parsing form parameters using $$
Message-Id: <slrn8uc3i8.o0j.bernard.el-hagin@gdndev25.lido-tech>
On Thu, 12 Oct 2000 19:10:04 -0000, arancj@yahoo.com <arancj@yahoo.com> wrote:
>I want to make a generic form function that takes a parameter from a form
>(ie. "email") and creates a variable named $email which has a value equal
>to $p->param($email). To do this I created the following code.
>
>use CGI;
>my $q = new CGI;
>my( $name, $value );
>
>foreach $name ( $q->param ){ #ie $name = email
> foreach $value( $q->param($name)){ #ie $value = arancj@yahoo.com
> $$name = $value; #ie $email = arancj@yahoo.com
> }
> }
>
>print "$email"; #should print arancj@yahoo.com but it doesn't
If you *really* want to do this try:
${$name} = $value;
But you *shouldn't* do this, as the plethora of upcoming posts will
testify.
Cheers,
Bernard
--
perl -le '$#="Just Another Perl Hacker"; print \Bernard'
------------------------------
Date: Thu, 12 Oct 2000 19:30:40 GMT
From: Dan Wilga <dwilgaREMOVE@mtholyoke.edu>
Subject: Re: Parsing form parameters using $$
Message-Id: <dwilgaREMOVE-E6FB67.15305412102000@news.mtholyoke.edu>
In article <suc34cooka375e@corp.supernews.com>, <arancj@yahoo.com> wrote:
> I want to make a generic form function that takes a parameter from a form
> (ie. "email") and creates a variable named $email which has a value equal
> to $p->param($email). To do this I created the following code.
>
Since you're already using the CGI module, why not just use the method
import_names that is already built-into it. I think you'll find that much
easier.
Do a `perldoc CGI` and search for "import_names" for more info.
Dan Wilga dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply **
------------------------------
Date: Thu, 12 Oct 2000 19:57:43 GMT
From: bmccoy@chapelperilous.net (Brett W. McCoy)
Subject: Re: Parsing form parameters using $$
Message-Id: <slrn8uc642.g7m.bmccoy@chapelperilous.net>
On Thu, 12 Oct 2000 19:10:04 -0000, arancj@yahoo.com <arancj@yahoo.com> wrote:
> I want to make a generic form function that takes a parameter from a form
> (ie. "email") and creates a variable named $email which has a value equal
> to $p->param($email). To do this I created the following code.
>
> use CGI;
> my $q = new CGI;
> my( $name, $value );
>
> foreach $name ( $q->param ){ #ie $name = email
> foreach $value( $q->param($name)){ #ie $value = arancj@yahoo.com
> $$name = $value; #ie $email = arancj@yahoo.com
> }
> }
>
> print "$email"; #should print arancj@yahoo.com but it doesn't
You might find it easier to use the Vars() function in CGI.pm. It'll give
you a hash with the keys being the named parameters in the query string:
$post_vars = $q->Vars;
print q->a({-href=>'mailto:'.$post_vars->{email}}, $post_vars->{email});
--
Brett W. McCoy
http://www.chapelperilous.net
---------------------------------------------------------------------------
A horse breeder has his young colts bottle-fed after they're three
days old. He heard that a foal and his mummy are soon parted.
------------------------------
Date: Thu, 12 Oct 2000 12:45:46 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: passing and returning hashes
Message-Id: <MPG.144fb4c397e7b37e98ae2f@nntp.hpl.hp.com>
In article <m3wvfe4vma.fsf@dhcp11-177.support.tivoli.com> on 11 Oct 2000
21:54:37 -0500, Ren Maddox <ren.maddox@tivoli.com> says...
...
> delete $fb_ref->{foo};
...
> delete $fb_ref->{bar};
> # this seems like too many hoops to jump through, but I don't
> # want to rebuild the entire hash, and nothing else comes to
> # mind. And my brain refused to cough up a way to make that
> # a slice. I suppose this would be a little better:
> # delete $fb_ref->{$_} for qw(foo bar);
delete @$fb_ref{qw(foo bar)};
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 12 Oct 2000 18:09:55 GMT
From: kevin metcalf <kmetcalf@NOTlighthouseNOTmarketingNOT.com>
Subject: Re: Perl and Filemaker
Message-Id: <39E5FEEF.86E80657@NOTlighthouseNOTmarketingNOT.com>
Manoj Ananthapadmanabhan wrote:
> Hi
> All our data is in Filemaker Pro database and we are planning to shift
> to MySql now.
> Is there any Perl module available with which I'll be able to connect to
> a Filemaker Pro database.
>
> Thanks
> Manoj
Well, while Filemaker Pro, INC would like you to think that their system is
the best in the world (which in fact it is, for smallish companies), they
don't really support (or allow) anyone to do this. I looked for months and
could only come up with a small plugin that only works with FM5. If you are
trying to do this from FM4 or earlier, well, your SOL. Here's how I got
around this:
1. Do an export into CSV
2. Load into Excel and do a find and replace any commas to something that is
not found in the text (such as <|> or whatever).
3. Export back into CSV.
4. Write a perl script to load in the file, line by line, and do a split on
the commas. (If your version of Excel exports headers, don't forget to
disregard the first line of the file.
5. Have your script now sitck the parsed data into the new database.
HIH
Kevin Metcalf
--
To reply to email, untie the nots. ;)
------------------------------
Date: Thu, 12 Oct 2000 11:25:02 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perl and Filemaker
Message-Id: <39E601FE.BFE24D0@vpservices.com>
kevin metcalf wrote:
>
> Manoj Ananthapadmanabhan wrote:
>
> > All our data is in Filemaker Pro database and we are planning to shift
> > to MySql now.
> > Is there any Perl module available with which I'll be able to connect to
> > a Filemaker Pro database.
> >
>
> I looked for months and
> could only come up with a small plugin that only works with FM5. If you are
> trying to do this from FM4 or earlier, well, your SOL.
Did you experiment with the FMPro ODBC driver?
> 2. Load into Excel and do a find and replace any commas to something that is
> not found in the text (such as <|> or whatever).
???? Why?
> 4. Write a perl script to load in the file, line by line, and do a split on
> the commas.
Bad way to parse CSV. See perlfaq4.
> (If your version of Excel exports headers, don't forget to
> disregard the first line of the file.
Bad idea if you use a CSV parser intelligent enough to read headers.
> 5. Have your script now sitck the parsed data into the new database.
Since he is dealing with MySQL, it makes more sense to use the included
loader, rather than mess with hand importing the CSV. If he goes the
CSV route, he ought to be able to just export the FM data to CSV and run
the MySQL loader with no perl scripting.
--
Jeff
------------------------------
Date: Thu, 12 Oct 2000 19:12:06 GMT
From: abevec@my-deja.com
Subject: perl cgi-bin error problem - beginner
Message-Id: <8s52dv$uve$1@nnrp1.deja.com>
I'm running Apache/Linux server and when my Perl cgi script tries to
execute I get the following error from Apache error log any pointers to
a begginer?
from error log:
[Thu Oct 12 15:00:12 2000] [error] (8)Exec format error: exec of
/home/httpd/cgi-bin/guestbook1.pl failed
[Thu Oct 12 15:00:12 2000] [error] [client 128.63.62.181] Premature end
of script headers: /home/httpd/cgi-bin/guestbook1.pl
Perl Script guestbook1.pl
#!/usr/bin/perl
$temp=$ENV{'QUERY_STRING'};
@pairs=split(/&/,$temp);
foreach $item(@pairs) {
($key,$content)=split (/=/,$item,2);
$content=~tr/+/ /;
$content=~ s/%(..)/pack("c",hex($1))/ge;
$fields{$key}=$content;
}
print "Content-type: text/html\n\n";
print "<body bgcolor=\"#FFFFFF\">\n";
print "<h2>$fields{'name'}</h2>\n";
print "<pre>$fields{'comment'}</pre>\n";
thanks for any help -abevec
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 12 Oct 2000 19:23:24 GMT
From: micah26@my-deja.com
Subject: Re: perl cgi-bin error problem - beginner
Message-Id: <8s5333$vi2$1@nnrp1.deja.com>
Are the permissions for the file set to 0755?
Micah
In article <8s52dv$uve$1@nnrp1.deja.com>,
abevec@my-deja.com wrote:
> I'm running Apache/Linux server and when my Perl cgi script tries to
> execute I get the following error from Apache error log any pointers
to
> a begginer?
>
> from error log:
>
> [Thu Oct 12 15:00:12 2000] [error] (8)Exec format error: exec of
> /home/httpd/cgi-bin/guestbook1.pl failed
> [Thu Oct 12 15:00:12 2000] [error] [client 128.63.62.181] Premature
end
> of script headers: /home/httpd/cgi-bin/guestbook1.pl
>
> Perl Script guestbook1.pl
>
> #!/usr/bin/perl
> $temp=$ENV{'QUERY_STRING'};
> @pairs=split(/&/,$temp);
> foreach $item(@pairs) {
> ($key,$content)=split (/=/,$item,2);
> $content=~tr/+/ /;
> $content=~ s/%(..)/pack("c",hex($1))/ge;
> $fields{$key}=$content;
> }
>
> print "Content-type: text/html\n\n";
> print "<body bgcolor=\"#FFFFFF\">\n";
> print "<h2>$fields{'name'}</h2>\n";
> print "<pre>$fields{'comment'}</pre>\n";
>
> thanks for any help -abevec
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 12 Oct 2000 19:37:24 GMT
From: abevec@my-deja.com
Subject: Re: perl cgi-bin error problem - beginner
Message-Id: <8s53tj$8k$1@nnrp1.deja.com>
In article <8s5333$vi2$1@nnrp1.deja.com>,
micah26@my-deja.com wrote:
Yes all permissions on files/directories are 755.
> Are the permissions for the file set to 0755?
> Micah
>
> In article <8s52dv$uve$1@nnrp1.deja.com>,
> abevec@my-deja.com wrote:
> > I'm running Apache/Linux server and when my Perl cgi script tries to
> > execute I get the following error from Apache error log any pointers
> to
> > a begginer?
> >
> > from error log:
> >
> > [Thu Oct 12 15:00:12 2000] [error] (8)Exec format error: exec of
> > /home/httpd/cgi-bin/guestbook1.pl failed
> > [Thu Oct 12 15:00:12 2000] [error] [client 128.63.62.181] Premature
> end
> > of script headers: /home/httpd/cgi-bin/guestbook1.pl
> >
> > Perl Script guestbook1.pl
> >
> > #!/usr/bin/perl
> > $temp=$ENV{'QUERY_STRING'};
> > @pairs=split(/&/,$temp);
> > foreach $item(@pairs) {
> > ($key,$content)=split (/=/,$item,2);
> > $content=~tr/+/ /;
> > $content=~ s/%(..)/pack("c",hex($1))/ge;
> > $fields{$key}=$content;
> > }
> >
> > print "Content-type: text/html\n\n";
> > print "<body bgcolor=\"#FFFFFF\">\n";
> > print "<h2>$fields{'name'}</h2>\n";
> > print "<pre>$fields{'comment'}</pre>\n";
> >
> > thanks for any help -abevec
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 12 Oct 2000 14:59:17 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: perl cgi-bin error problem - beginner
Message-Id: <87y9zt25m2.fsf@limey.hpcc.uh.edu>
>> On Thu, 12 Oct 2000 19:12:06 GMT,
>> abevec@my-deja.com said:
> I'm running Apache/Linux server and when my Perl cgi
> script tries to execute I get the following error from
> Apache error log any pointers to a begginer?
> from error log:
> [Thu Oct 12 15:00:12 2000] [error] (8)Exec format error:
You haven't installed a perl compiled for another
architecture have you?
Try: file /usr/bin/perl
and see what it reports. On my i386 linux box:
/usr/bin/perl: ELF 32-bit LSB executable, Intel 80386, \
version 1, dynamically linked (uses shared libs), not stripped
Either that or /usr/bin/perl might not be what you think
it is.
> #!/usr/bin/perl $temp=$ENV{'QUERY_STRING'};
Ewwww. Switch to CGI.pm, it'll make life a lot easier.
perldoc CGI
hth
t
--
Eih bennek, eih blavek.
------------------------------
Date: Thu, 12 Oct 2000 19:46:30 GMT
From: micah26@netscape.net
Subject: Re: perl cgi-bin error problem - beginner
Message-Id: <8s54ek$p7$1@nnrp1.deja.com>
Do you need use CGI to access the ENV hash?
Micah
In article <8s53tj$8k$1@nnrp1.deja.com>,
abevec@my-deja.com wrote:
> In article <8s5333$vi2$1@nnrp1.deja.com>,
> micah26@my-deja.com wrote:
>
> Yes all permissions on files/directories are 755.
>
> > Are the permissions for the file set to 0755?
> > Micah
> >
> > In article <8s52dv$uve$1@nnrp1.deja.com>,
> > abevec@my-deja.com wrote:
> > > I'm running Apache/Linux server and when my Perl cgi script tries
to
> > > execute I get the following error from Apache error log any
pointers
> > to
> > > a begginer?
> > >
> > > from error log:
> > >
> > > [Thu Oct 12 15:00:12 2000] [error] (8)Exec format error: exec of
> > > /home/httpd/cgi-bin/guestbook1.pl failed
> > > [Thu Oct 12 15:00:12 2000] [error] [client 128.63.62.181]
Premature
> > end
> > > of script headers: /home/httpd/cgi-bin/guestbook1.pl
> > >
> > > Perl Script guestbook1.pl
> > >
> > > #!/usr/bin/perl
> > > $temp=$ENV{'QUERY_STRING'};
> > > @pairs=split(/&/,$temp);
> > > foreach $item(@pairs) {
> > > ($key,$content)=split (/=/,$item,2);
> > > $content=~tr/+/ /;
> > > $content=~ s/%(..)/pack("c",hex($1))/ge;
> > > $fields{$key}=$content;
> > > }
> > >
> > > print "Content-type: text/html\n\n";
> > > print "<body bgcolor=\"#FFFFFF\">\n";
> > > print "<h2>$fields{'name'}</h2>\n";
> > > print "<pre>$fields{'comment'}</pre>\n";
> > >
> > > thanks for any help -abevec
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4599
**************************************