[23234] in Perl-Users-Digest
Perl-Users Digest, Issue: 5455 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 7 18:05:50 2003
Date: Sun, 7 Sep 2003 15:05:12 -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 Sun, 7 Sep 2003 Volume: 10 Number: 5455
Today's topics:
Re: Active Perl, Windows scheduler, regular task... <kuujinbo@hotmail.com>
Re: AI::GA (Arthur T. Murray)
Re: AI::GA <cwilbur@mithril.chromatico.net>
Appending at various locations. (MJS)
Re: Appending at various locations. <jkeen@concentric.net>
automate file upload using perl ([nix])
Re: automate file upload using perl <nobull@mail.com>
Call PL/SQL procedure from Perl - DBI (Sashafay)
Re: Call PL/SQL procedure from Perl - DBI <joachim.pense@t-online.de>
Re: DBI Output Help (Tom)
Re: Embedded Perl or Python (XPost) <amk@amk.ca>
Re: Embedded Perl or Python (XPost) <tassilo.parseval@rwth-aachen.de>
Re: flash form strange encoding <nobull@mail.com>
Help configuring Perl with Apache 2 <cyde@umd.edu>
Re: Help configuring Perl with Apache 2 <postmaster@castleamber.com>
Re: Help configuring Perl with Apache 2 <cyde@umd.edu>
Re: Help configuring Perl with Apache 2 <postmaster@castleamber.com>
Re: Help configuring Perl with Apache 2 <abuse@mweb.co.za>
Re: Help configuring Perl with Apache 2 <postmaster@castleamber.com>
Re: Help configuring Perl with Apache 2 (Tad McClellan)
Re: Help configuring Perl with Apache 2 <flavell@mail.cern.ch>
Re: Help configuring Perl with Apache 2 <abigail@abigail.nl>
Re: How do I count keys in a BerkeleyDB *quickly* (usin <abigail@abigail.nl>
MS Graph Objects, problem with Legend-text (rem. x)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 07 Sep 2003 18:03:10 +0900
From: ko <kuujinbo@hotmail.com>
Subject: Re: Active Perl, Windows scheduler, regular task...
Message-Id: <bjesad$cqb$1@pin3.tky.plala.or.jp>
Vlad Tepes wrote:
> Apropos running perl as a windows service.
>
> I've read that activestates perl dev-kit compiles perlscripts into
> executables that can be run as a service. Are there free alternatives?
>
If you don't mind installing cygwin (http://www.cygwin.com/), crond runs
as a Windows service.
Never used it, but Win32::Daemon is on CPAN:
http://search.cpan.org/author/DAVEROTH/Win32-Scheduler_v20000702/lib/Win32/Scheduler.PM
HTH - keith
------------------------------
Date: 6 Sep 2003 21:50:27 -0800
From: uj797@victoria.tc.ca (Arthur T. Murray)
Subject: Re: AI::GA
Message-Id: <3f5ab913@news.victoria.tc.ca>
Keywords: AI, artificial intelligence, corporate sponsorship
> Arthur T. Murray is a net.kook.
* "A prophet is without honor in his own country."
The Mentifex AI Mind project is not faring well here in the
United States -- a country full of ignorance and war-mongering.
Perhaps a corporate or private entity in a more civilized
country (France? Germany? Japan?) would like to fund AI?
http://doi.acm.org/10.1145/307824.307853 -- ACM SIGPLAN Notices.
http://www.sl4.org/archive/0205/3829.html -- Ben Goertzel, Ph.D.
A.T. Murray
--
http://www.kurzweilai.net/mindx/profile.php?id=26 - Mind-eXchange;
http://www.q-ag.de/~wspraul/fsdd/ -- Free Software Don. Directory.
* God (personal communication)
------------------------------
Date: Sun, 07 Sep 2003 19:15:05 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: AI::GA
Message-Id: <87k78kjubu.fsf@mithril.chromatico.net>
>>>>> "ATM" == Arthur T Murray <uj797@victoria.tc.ca> writes:
>> Arthur T. Murray is a net.kook.
ATM> * "A prophet is without honor in his own country."
A kook is also without honor in his own country; that lack of honor is
not sufficient to demonstrate that one is a prophet and not a kook.
Charlton
--
cwilbur at chromatico dot net
cwilbur at mac dot com
------------------------------
Date: 7 Sep 2003 11:12:18 -0700
From: tabletdesktop@yahoo.com (MJS)
Subject: Appending at various locations.
Message-Id: <f0171209.0309071012.606a61bd@posting.google.com>
I have to ask the user to input any two digits e.g input= 3,5 (their
value can be upto 300-whole numbers only). These two numbers have to
be associated with multiple strings. As an example, 3 is associated
to "hello" and 5 is associated to "cool". After the input, an existing
file at various locations should be edited automatically. These
locations can be determined by certain strings e.g "howr u" and "is
it hot" etc? Once these strings are searched and found, then text like
hello_1, hello_2, hello_3 and cool_1, cool_2,cool_3,cool_4, etc
should be added to this file. The
number of times hello_1, hello_2 etc and cool_1, cool_2 etc. should
be added depends on the users input.
e.g
a file contains some text.
some text..... i m from the city..... "how r u" ..... how is the weather there
"is it hot".......thats good.
when the user inputs 3, 5. The file should then be edited to
some text ..... i m from the city ...."how r u" hello_1,hello_2,hello_3 .....
how is the weather there "is it hot" cool_1,cool_2, cool_3, cool_4,
cool_5........thats good.
============================================
#!/usr/bin/perl
use strict;
use warnings;
print "enter counts for 'hello' and 'cool' with a space in
between: ";
my $nums = <STDIN>;
# key=word, value=count for that word
my %word_count;
@word_count{ 'hello', 'cool' } = split /\s+/, $nums; # a "hash
slice"
# key=search phrase, value=the word to tack on when found
my %words = ( '"how r u"' => 'hello', '"is it hot"' => 'cool' );
# key=search phrase, value=string with the right # of words/commas
my %patterns;
foreach my $pat ( keys %words ) {
$patterns{$pat} = join ',', map { "$words{$pat}_$_" }
1 .. $word_count{$words{$pat}};
}
open(FILEREAD, "data") or die "Can't open data: $!\n";
my $pattern = join '|', keys %patterns;
open(F,">>data") or die "Can't open data: $!\n";
while (<FILEREAD>) {
s/($pattern)/$1 $patterns{$1}/g;
print F $_;
};
close(F);
close(FILEREAD);
======================================
------------------------------
Date: 07 Sep 2003 19:37:58 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Appending at various locations.
Message-Id: <bjg1em$rlf@dispatch.concentric.net>
"MJS" <tabletdesktop@yahoo.com> wrote in message
news:f0171209.0309071012.606a61bd@posting.google.com...
> I have to ask the user to input any two digits e.g input= 3,5 (their
> value can be upto 300-whole numbers only). These two numbers have to
> be associated with multiple strings. As an example, 3 is associated
> to "hello" and 5 is associated to "cool". After the input, an existing
> file at various locations should be edited automatically. These
> locations can be determined by certain strings e.g "howr u" and "is
> it hot" etc? Once these strings are searched and found, then text like
> hello_1, hello_2, hello_3 and cool_1, cool_2,cool_3,cool_4, etc
> should be added to this file. The
> number of times hello_1, hello_2 etc and cool_1, cool_2 etc. should
> be added depends on the users input.
> e.g
>
> a file contains some text.
> some text..... i m from the city..... "how r u" ..... how is the weather
there
> "is it hot".......thats good.
>
> when the user inputs 3, 5. The file should then be edited to
>
> some text ..... i m from the city ...."how r u" hello_1,hello_2,hello_3
.....
> how is the weather there "is it hot" cool_1,cool_2, cool_3, cool_4,
> cool_5........thats good.
>
[script snipped]
... And your question is?
------------------------------
Date: 7 Sep 2003 01:22:00 -0700
From: maumul@hotmail.com ([nix])
Subject: automate file upload using perl
Message-Id: <f9b2fa1a.0309070022.659a8395@posting.google.com>
Hi,
I'm trying to automate a process to upload a file to hotmail, but
having a strange error and I don't know what I'm doing wrong with the
script.
below is the code:
use HTTP::Request::Common;
use LWP;
-- snipped --
$ua = new LWP::UserAgent;
$ua->agent('Mozilla/5.0 (compatible; MSIE 5.5; Windows 98; Win 9x;
Windows 2000)');
$response = $ua->request(POST
'http://by7fd.bay7.hotmail.msn.com/cgi-bin/doattach',
Content_Type => 'form-data',
Content => [ curmbox => 'F000000001',
HrsTest => '',
attachmentfilename => '',
attachorcancel => '',
userfilename => '',
contentType => '',
smsg => 'jaja.saved',
attfiles => '',
stationery => '',
originalstationery => '',
ref => '',
RTEbgcolor => '',
from => 'compose',
oldattfile => '',
_HMAction => '',
attfile => ['./text.txt'],
]
);
print ($response->is_success) ? $response->content :
$response->status_line;
The error message returned:
<!-- counter(177) >= nLines(177)! -->
<!-- H: bay7-f64.bay7.hotmail.com -->
<!-- V: WIN2K 09.07.50.0039 i -->
<!-- D: Sep 3 2003 18:03:53-->
<!-- S: 0-->
I'd appreciate very much if somebody could enlight me with some
inputs.
Thanks.
------------------------------
Date: 07 Sep 2003 19:41:30 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: automate file upload using perl
Message-Id: <u9llt0a1b9.fsf@wcl-l.bham.ac.uk>
maumul@hotmail.com ([nix]) writes:
> I'm trying to automate a process to upload a file to hotmail, but
> having a strange error
> print ($response->is_success) ? $response->content :
> $response->status_line;
>
>
> The error message returned:
> <!-- counter(177) >= nLines(177)! -->
> <!-- H: bay7-f64.bay7.hotmail.com -->
> <!-- V: WIN2K 09.07.50.0039 i -->
> <!-- D: Sep 3 2003 18:03:53-->
> <!-- S: 0-->
What made you conclude that that was an error message?
Looks like some sort of debugging aid to me.
I suggest you take a look at the response headers.
BTW: I don't think your question has anything to do with Perl but I'm
not aware of any newsgroup that deals with the language-neutral
aspects of writing automated web clients.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 7 Sep 2003 11:23:23 -0700
From: afayfman@mwh.com (Sashafay)
Subject: Call PL/SQL procedure from Perl - DBI
Message-Id: <a13f8a22.0309071023.4404282f@posting.google.com>
Hi,
How I can call PL/SQL store procedure from Perl - DBI script?
Thanks in advance,
Alex
------------------------------
Date: Sun, 07 Sep 2003 20:56:36 +0200
From: Joachim Pense <joachim.pense@t-online.de>
Subject: Re: Call PL/SQL procedure from Perl - DBI
Message-Id: <bjfusn$10h$03$1@news.t-online.com>
Sashafay wrote:
> Hi,
>
> How I can call PL/SQL store procedure from Perl - DBI script?
>
$dbh->do("begin procedure_call; end;");
Actually, you can access procedure parameters (even in/out ones) and
read dbms_output. It is documented in the DBD::Oracle POD.
Joachim
------------------------------
Date: 7 Sep 2003 06:13:42 -0700
From: tom@ztml.com (Tom)
Subject: Re: DBI Output Help
Message-Id: <59b4279a.0309070513.344d894e@posting.google.com>
ompers@hotmail.com (Tom) wrote in message news:<f4144fab.0309061156.77e83ec1@posting.google.com>...
> Hello.
>
> I am learning Perl and have decided to create a web page that has
> dropdowns populated by a postgreSQL DB. I've been able to do this and
> the page looks fine but the code is awful. A chunk of the code is
> posted below; can anyone suggest a way to clean this up and make it
> more efficient? Namely, I am trying to consolidate the actual
> population of the <SELECT> into one loop, and figure out a way to get
> rid of the ugly "$i < scalar(@array)" line.
>
> This all works, but I'm still learning Perl and haven't figured out
> how to make it work good!
>
> Thanks,
> Tom
>
> CODE BELOW:
> ===========
>
>
> #!/opt/perl/bin/perl -wT
> use DBI;
> use CGI;
> use CGI::Carp qw(fatalsToBrowser);
>
> my $q = new CGI;
>
> my $dbh = DBI->connect( "dbi:Pg:dbname=web" ) || die;
> my @a = ('groupdescription','groups');
> my @b = ('role','servers_role');
> my $sth1 = $dbh->prepare("Select $a[0] from $a[1] order by $a[0]");
> my $sth2 = $dbh->prepare("Select $b[0] from $b[1] order by $b[0]");
>
> $sth1->execute;
> $sth2->execute;
>
> print $q->header,
> $q->start_html,
> $q->startform,
> "<table><Tr><td>$a[0]</td>",
> "<td><Select name=\"$a[0]\">";
>
> while( @row1 = $sth1->fetchrow ) {
> for( $i = 0; $i < scalar(@row1); $i++ ) {
> print "<option value=\"$row1[$i]\">$row1[$i]";
> }
> }
> print "</Select></td></Tr>",
> "<Tr><td>$b[0]</td>",
> "<td><Select name=\"$b[0]\">";
>
> while( @row2 = $sth2->fetchrow ) {
> for( $i = 0; $i < scalar(@row2); $i++ ) {
> print "<option value=\"$row2[$i]\">$row2[$i]";
> }
> }
> print "</Select></td></Tr></table></body></html>";
Try this...
my ($selectrow1,$selectrow2) =
("<table><Tr><td>$a[0]</td><td><select name='$a[0]'>",
"<tr><td>$b[0]</td><td><select name='$b[0]'>");
while( (@row1 = $sth1->fetchrow ) or (@row2 = $sth2->fetchrow) )
{
for (@row1) { $selectrow1 .= "<option value='$_\'>$_</option>\n" }
for (@row2) { $selectrow2 .= "<option value='$_\'>$_</option>\n" }
}
print "$selectrow1</Select></td></Tr>\n$selectrow2</Select></td></Tr></table></body></html>";
Tom
ztml.com
------------------------------
Date: Sun, 07 Sep 2003 10:09:46 -0500
From: "A.M. Kuchling" <amk@amk.ca>
Subject: Re: Embedded Perl or Python (XPost)
Message-Id: <nBCdnYuqRO-n18aiRTvUqg@speakeasy.net>
On Sat, 06 Sep 2003 15:30:09 GMT,
Alex Martelli <aleax@aleax.it> wrote:
> modules (Python lacks Perl's CPAN, so far, but does have a huge included
> library).
Er, you're forgetting PyPI (http://www.python.org/pypi).
--amk
------------------------------
Date: 7 Sep 2003 17:37:28 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Embedded Perl or Python (XPost)
Message-Id: <bjfqco$do2$1@nets3.rz.RWTH-Aachen.DE>
Also sprach A.M. Kuchling:
> On Sat, 06 Sep 2003 15:30:09 GMT,
> Alex Martelli <aleax@aleax.it> wrote:
>> modules (Python lacks Perl's CPAN, so far, but does have a huge included
>> library).
>
> Er, you're forgetting PyPI (http://www.python.org/pypi).
Well, I doubt that this even comes close to the CPAN. :-)
The CPAN is a 'little' more than just a repository of modules. It has a
hierarchie of namespaces, hooks to related sites such as
testers.cpan.org, cpanratings.perl.org, pause.cpan.org, rt.cpan.org, a
narrow grid of mirrors world-wide, can be accessed remotely through
several Perl modules and so on and so forth.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: 07 Sep 2003 19:50:32 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: flash form strange encoding
Message-Id: <u9he3oa0w7.fsf@wcl-l.bham.ac.uk>
ibt325@bk.ru (Sem K.) writes:
> I have an internationalized flash form, that posts (via GET) to a perl
> cgi script.
>
> The form has a name field. 3/4 of the times, I receive the name, as I
> expect in unicode.
When you say 'unicode' do you mean UTF8?
> However, in other cases, I receive something like
> that: "áãéºä ...." .
>
> Have someone encountered something similar ?
That looks like the way HTML (or XML of any other SGML derived ML)
encode characters outsite the current encoding. Looks like somehow
the client thinks the field is of type text/html (or somesuch) rather
than text/plain.
I somehow doubt this is Perl related.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sun, 07 Sep 2003 14:07:32 -0400
From: Cyde Weys <cyde@umd.edu>
Subject: Help configuring Perl with Apache 2
Message-Id: <bjfs54$poj$1@grapevine.wam.umd.edu>
This is more of an Apache question than a Perl question, but I'll go
for it here. I installed RedHat 9 (including Apache 2 and Perl) from
CD. Now, I'm trying to configure the webserver to execute perl scripts.
I have set the "Options ExecCGI" as well as the "AddHandler cgi-script
.pl" ... but when I try to load up index.pl, I get a "Forbidden access"
error message. I have chmod a+x the index.pl file. When I take out the
line "AddHandler cgi-script .pl", opening up index.pl just shows you the
contents of the .pl file. I don't see why I'm getting "forbidden" error
messages ... I do have the permissions set up to allow it to run. Also,
I've verified that the Perl file runs correctly from the www directory
with "./index.pl" ... any help would be greatly appreciated. Thanks.
BTW, as of now, index.pl is this:
#!/usr/bin/perl
print("Test\n");
------------------------------
Date: Sun, 07 Sep 2003 20:30:45 +0200
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <1062959549.734185@halkan.kabelfoon.nl>
Cyde Weys wrote:
> This is more of an Apache question than a Perl question, but I'll go
> for it here. I installed RedHat 9 (including Apache 2 and Perl) from
> CD. Now, I'm trying to configure the webserver to execute perl scripts.
> I have set the "Options ExecCGI" as well as the "AddHandler cgi-script
> .pl" ... but when I try to load up index.pl, I get a "Forbidden access"
> error message. I have chmod a+x the index.pl file. When I take out the
> line "AddHandler cgi-script .pl", opening up index.pl just shows you the
> contents of the .pl file. I don't see why I'm getting "forbidden" error
> messages ... I do have the permissions set up to allow it to run. Also,
> I've verified that the Perl file runs correctly from the www directory
> with "./index.pl" ... any help would be greatly appreciated. Thanks.
check error_log
> BTW, as of now, index.pl is this:
>
> #!/usr/bin/perl
> print("Test\n");
which is *wrong*
Check out CGI.pm and read about "headers". Don't write CGI perl scripts
with your own homebrew CGI.
--
Kind regards, feel free to mail: mail(at)johnbokma.com (or reply)
virtual home: http://johnbokma.com/ ICQ: 218175426
John web site hints: http://johnbokma.com/websitedesign/
------------------------------
Date: Sun, 07 Sep 2003 14:38:13 -0400
From: Cyde Weys <cyde@umd.edu>
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <bjftuj$qei$2@grapevine.wam.umd.edu>
John Bokma wrote:
> Check out CGI.pm and read about "headers". Don't write CGI perl scripts
> with your own homebrew CGI.
Okay, I know about CGI.pm ... I've used it before ... but are you saying
that becuase I'm not using correct Perl CGI I'm getting forbidden error
messages?
------------------------------
Date: Sun, 07 Sep 2003 20:52:02 +0200
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <1062960826.527996@halkan.kabelfoon.nl>
Cyde Weys wrote:
> John Bokma wrote:
>
>> Check out CGI.pm and read about "headers". Don't write CGI perl
>> scripts with your own homebrew CGI.
>
>
> Okay, I know about CGI.pm ... I've used it before ... but are you saying
> that becuase I'm not using correct Perl CGI I'm getting forbidden error
> messages?
If you fix that problem you get a 505 server error because you don't
send a header (so I prevented maybe a future error :-)
Check the error_log
locate error_log
or
find / -name error_log -print
or, if you know the location of the conf dir, the logs dir is often in
the same dir as conf.
During development it is always a good idea to have an console which does:
tail -f error_log
Another tip: use the -w and -T switch *both* and use strict;
--
Kind regards, feel free to mail: mail(at)johnbokma.com (or reply)
virtual home: http://johnbokma.com/ ICQ: 218175426
John web site hints: http://johnbokma.com/websitedesign/
------------------------------
Date: Sun, 07 Sep 2003 21:57:24 +0200
From: "Nico Coetzee" <abuse@mweb.co.za>
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <pan.2003.09.07.19.57.23.775917@mweb.co.za>
On Sun, 07 Sep 2003 14:38:13 -0400, Cyde Weys wrote:
> John Bokma wrote:
>
>> Check out CGI.pm and read about "headers". Don't write CGI perl scripts
>> with your own homebrew CGI.
>
> Okay, I know about CGI.pm ... I've used it before ... but are you saying
> that becuase I'm not using correct Perl CGI I'm getting forbidden error
> messages?
You should at least send the content type header:
print "Content-type: text/html\n\n";
print "<html>....</html>";
Note the double '\n' after the header
Cheers
--
Nico Coetzee
http://www.itfirms.co.za/
http://za.pm.org/
http://forums.databasejournal.com/
To the systems programmer, users and applications serve only to provide a
test load.
------------------------------
Date: Sun, 07 Sep 2003 22:13:32 +0200
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <1062965717.185682@halkan.kabelfoon.nl>
Nico Coetzee wrote:
> On Sun, 07 Sep 2003 14:38:13 -0400, Cyde Weys wrote:
>
>
>>John Bokma wrote:
>>
>>
>>>Check out CGI.pm and read about "headers". Don't write CGI perl scripts
>>>with your own homebrew CGI.
>>
>>Okay, I know about CGI.pm ... I've used it before ... but are you saying
>>that becuase I'm not using correct Perl CGI I'm getting forbidden error
>>messages?
>
>
> You should at least send the content type header:
>
> print "Content-type: text/html\n\n";
> print "<html>....</html>";
>
> Note the double '\n' after the header
And that's why I advise using CGI.pm. Then you don't have to think about
that.
use CGI;
my $cgi = new CGI;
print $cgi->header,
$cgi->start_html(...)
:
$cgi->end_html;
Notice that I prefer using $cgi instead of $q or $query. Using $q(uery)
is confusing since the object is not used for query only, especially not
in this example.
Also I recommend using the HTML generating functions instead of doing
your own <html>... stuff. Only yesterday I had to fix two occurences of
"<tr>" to the correct "</tr>" in my code :-(
Always validate your HTML output.
--
Kind regards, feel free to mail: mail(at)johnbokma.com (or reply)
virtual home: http://johnbokma.com/ ICQ: 218175426
John web site hints: http://johnbokma.com/websitedesign/
------------------------------
Date: Sun, 7 Sep 2003 15:14:44 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <slrnbln4dk.goj.tadmc@magna.augustmail.com>
Cyde Weys <cyde@umd.edu> wrote:
> This is more of an Apache question than a Perl question, but I'll go
> for it here.
*plonk*
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 7 Sep 2003 21:42:34 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <Pine.LNX.4.53.0309072130110.10528@lxplus079.cern.ch>
On Sun, Sep 7, Cyde Weys inscribed on the eternal scroll:
> Okay, I know about CGI.pm ... I've used it before ...
It's a good choice, even if you know how to produce CGI responses
yourself. But feel free to learn what a CGI response looks like
anyway (hint: perlfaq9 has pointers, but such discussions are on-topic
for comp.infosystems.www.authoring.cgi rather than c.l.p.misc).
Also online at http://www.perldoc.com/perl5.8.0/pod/perlfaq9.html
> but are you saying that becuase I'm not using correct Perl CGI I'm
> getting forbidden error messages?
Having a problem parsing that. Oh, right - you said:
| I'm getting "forbidden" error messages
With respect, there _is_ a difference between "forbidden error
messages", and error messages which say "forbidden".
And there was no specifically "Perl" error in your wrong CGI response.
CGI stands for "common gateway interface": it isn't specific to Perl
or to any other individual programming language.
Well, your server configuration is wrong somehow. You need to inspect
the error log.
But anyway: your script's response (the one exhibited in your original
posting) was an invalid CGI response. What are you trying to achieve?
If you're just playing around to understand the CGI, then go right
ahead, but you need to refer to the spec or to some kind of tutorial
to understand what you're doing. But if you're trying to make
something that works in a real WWW context, then use CGI.pm.
Either way, you rate to get a dusty reception here if you ask purely
CGI-related questions.
good luck.
------------------------------
Date: 07 Sep 2003 21:00:31 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Help configuring Perl with Apache 2
Message-Id: <slrnbln73f.fud.abigail@alexandra.abigail.nl>
Cyde Weys (cyde@umd.edu) wrote on MMMDCLIX September MCMXCIII in
<URL:news:bjfs54$poj$1@grapevine.wam.umd.edu>:
{} This is more of an Apache question than a Perl question, but I'll go
{} for it here.
Then why you posting here?
*PLONK*
Abigail
--
perl -swleprint -- -_='Just another Perl Hacker'
------------------------------
Date: 07 Sep 2003 21:09:37 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: How do I count keys in a BerkeleyDB *quickly* (using DB_File)?
Message-Id: <slrnbln7kh.fud.abigail@alexandra.abigail.nl>
Damon Hastings (damonhastings@yahoo.com) wrote on MMMDCLVIII September
MCMXCIII in <URL:news:76c7896d.0309051913.6bf1afb7@posting.google.com>:
:) I have a berkeley db which I'm accessing via the DB_File interface (a
:) btree). I would like a quick way to count how many keys are in the
:) file. If I just use "scalar keys %hash", then it takes forever! (The
:) file has millions of keys.) Can anyone help me?
'scalar keys %hash' is the way to go. The only way to get the number
of keys from a db hash is to count them.
Abigail
--
$" = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%_ = (Just => another => Perl => Hacker); &{%_};
------------------------------
Date: Sun, 7 Sep 2003 20:16:08 +0200
From: "Dahler" <xdahler@mail.tele.dk(rem. x)>
Subject: MS Graph Objects, problem with Legend-text
Message-Id: <3f5b75e9$0$32438$edfadb0f@dread16.news.tele.dk>
Hi
I am trying to make a graph, using Microsoft Graph Objects. I have made a
clustered bar graph with two columns pr. month pr. year. I have problems
with the text in the legend.
I have 'enabled' the legend:
$Graph->{HasLegend} = 1;
The legend is visible, but there is no text in it; just the tow squares. I
had expected to se the names of the SeriesCollections. I have tryed to
change the names of the SeriesCollections:
$Graph->SeriesCollection(1)->{Name} = "ABC";
but that doesn't make the legend-text visible.
I must have forgot to 'enable' something - can somebody give me a hint?
Many thanks in advance,
Dahler
------------------------------
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 5455
***************************************