[15570] in Perl-Users-Digest
Perl-Users Digest, Issue: 2983 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 8 21:06:06 2000
Date: Mon, 8 May 2000 18:05:19 -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: <957834318-v9-i2983@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 8 May 2000 Volume: 9 Number: 2983
Today's topics:
Re: a cgi problem... <rootbeer@redcat.com>
Re: BEGIN and use (Abigail)
Re: Bijeenkomst Amsterdam Perl Mongers, Dinsdag 2 Mei 2 (Abigail)
Re: BUG? Get comand line parameter with ActiveState Per <rootbeer@redcat.com>
Re: Can anyone recommend a good book <gellyfish@gellyfish.com>
CGI Wrap <kushiner@nqi.net>
Re: CGI Wrap <phill@modulus.com.au>
Re: Checking if Child Process is still Alive <rootbeer@redcat.com>
Re: Color under MS-DOS/WINNT <gellyfish@gellyfish.com>
Re: DIRHANDLE problems <rootbeer@redcat.com>
Re: dynamic html <rootbeer@redcat.com>
Re: file permisions- setuid? <rootbeer@redcat.com>
Re: Getting variables from html <kerry@shetline.com>
Re: Getting variables from html <jeff@vpservices.com>
Re: Getting variables from html <flavell@mail.cern.ch>
Re: Getting variables from html <kerry@shetline.com>
goto function <andy@u2me3.com>
help on code. thanks a lot. <hmmidi@geocities.com>
Help with Win32::Tie Registry <danielg@tid.es>
Re: How do I use a dll ? <michaelr@apgtest.com>
HTTP::Request=HASH(0x7bb141c) ? <nospam@devnull.com>
LWP documentation itsamoomoo@my-deja.com
Re: LWP documentation <makarand_kulkarni@My-Deja.com>
Mail::Mailer not setting from? <john@ieffects.com>
Re: making a package (NOT a module) <nospam@devnull.com>
Need help on displaying REMOTE_HOST joydip_chaklader@my-deja.com
nt, perl, and smtp mail embern@my-deja.com
perl and cdonts embern@my-deja.com
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 8 May 2000 16:49:13 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: a cgi problem...
Message-Id: <Pine.GSO.4.10.10005081648260.3921-100000@user2.teleport.com>
On Mon, 8 May 2000, Ken Wong Lai Yin wrote:
> I'm now trying to set up a http server on pc(Apache), with perl support.
It sounds as if you want to search for the docs, FAQs, and newsgroups
about webservers in general, your webserver in particular, and how to
configure it to do what you want. Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 8 May 2000 22:51:06 GMT
From: abigail@ucan.foad.org (Abigail)
Subject: Re: BEGIN and use
Message-Id: <slrn8heh6q.234.abigail@ucan.foad.org>
In article <MPG.137b869d93d0524598aa04@nntp.hpl.hp.com>, Larry Rosler wrote:
>In article <87u2gerqul.fsf@shleppie.uh.edu> on 04 May 2000 15:40:49 -
>0500, Tony Curtis <tony_curtis32@yahoo.com> says...
>>
>> statements in perl are terminated by `;'
>
>That is a true statement.
No, it's not.
$ perl -we '{print "Hello, "} {print "world\n"}'
Hello, world
$
Several statements, no semicolons.
Abigail
------------------------------
Date: 8 May 2000 22:59:08 GMT
From: abigail@ucan.foad.org (Abigail)
Subject: Re: Bijeenkomst Amsterdam Perl Mongers, Dinsdag 2 Mei 2000
Message-Id: <slrn8hehls.234.abigail@ucan.foad.org>
In article <8eag65$5to$1@xs4.xs4all.nl>, johnpc@xs4all.nl wrote:
>[English version follows the dutch text]
I can't help wondering what will happen to this newsgroup if all of the
hundreds of Mongers groups post their announcements to this group. Some
groups even meet weekly.
Or are only the Dutch too stupid to set up a mailing list?
Abigail
------------------------------
Date: Mon, 8 May 2000 16:52:38 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: BUG? Get comand line parameter with ActiveState Perl
Message-Id: <Pine.GSO.4.10.10005081650460.3921-100000@user2.teleport.com>
On Mon, 8 May 2000, Markus Enders wrote:
> I'm still wondering what makes Perl-scripts not to get any command
> line parameters anymore and so suddently (from one second to the
> other...) And I'm still curious what this message in the event monitor
> means...
Sorry, but I can't tell what you're talking about. But by "message", could
you mean one of perl's diagnostic messages? See the perldiag manpage for
those.
Can you make a small, self-contained program which displays the behavior
you're talking about? Ideally, it should be no more than a dozen or so
lines. If you're talking about two phenomena, you may need to write two of
these sample programs.
Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 5 May 2000 23:56:16 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Can anyone recommend a good book
Message-Id: <8evjig$j8a$1@orpheus.gellyfish.com>
On Thu, 04 May 2000 17:32:36 GMT Jon S. wrote:
>
> BTW, why hasn't anyone just gone ahead and just created
> comp.lang.perl.cgi or comp.lang.perl.www and got it over with already?
> After all, what unsuspecting newbie would know that a .misc group was
> really an .only.ask.about.pure.perl.or.you.might.get.flamed group?
>
There *is* already comp.infosystems.www.authoring.cgi there doesnt need
to be another group for this. There has been plenty of discussion on
this in the past - you could search Deja News for more on this if you
are interested.
/J\
--
Mmmm...fuzzy.
--
fortune oscar homer
------------------------------
Date: Mon, 8 May 2000 19:46:53 -0400
From: "John Alexander Kushiner" <kushiner@nqi.net>
Subject: CGI Wrap
Message-Id: <39175134_1@news.cybertours.com>
Hello all,
I recently put a CGI-BIN in and was informed by my ISP that in order for me
to run Perl scripts I would need to use something called CGI wrap. The
information I found was at a unix help site. However, when I downloaded the
necessary files I wasn;t any better off. Can someone who has had experience
with CGI wrap give me a heads up about what I am supposed to expect with
this? I'm not sure what I am even supposed to do with it! I apprecite
anything in advance.
John
------------------------------
Date: Tue, 09 May 2000 09:59:07 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: CGI Wrap
Message-Id: <391754CB.14BE@modulus.com.au>
John Alexander Kushiner wrote:
>
> Hello all,
>
> I recently put a CGI-BIN in and was informed by my ISP that in order for me
> to run Perl scripts I would need to use something called CGI wrap. The
> information I found was at a unix help site. However, when I downloaded the
> necessary files I wasn;t any better off. Can someone who has had experience
> with CGI wrap give me a heads up about what I am supposed to expect with
> this? I'm not sure what I am even supposed to do with it! I apprecite
> anything in advance.
>
> John
You would get a better answer to this question at
comp.infosystems.www.authoring.cgi
where the cgi experts live.
hth
--
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/
------------------------------
Date: Mon, 8 May 2000 17:21:17 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Checking if Child Process is still Alive
Message-Id: <Pine.GSO.4.10.10005081717560.3921-100000@user2.teleport.com>
On 8 May 2000 abeall@ipcell.com wrote:
> kill("TERM", $kidpid); # send SIGTERM to child
> if (kill 0 => $kidpid){
It may still be alive for a moment after it gets the first signal; give it
a moment to get a time slice so that it has a chance to die!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 5 May 2000 22:51:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Color under MS-DOS/WINNT
Message-Id: <8evfpm$79n$1@orpheus.gellyfish.com>
On Fri, 05 May 2000 16:22:06 +0200 Francois Dupradeau wrote:
> Hello !
>
> I have a problem to get colors under MS-DOS with Windows NT. I have
> installed the Term-ANSIColor module with PPM.
> When I run the test.pl script , perl show the color code instead of the
> colors.
>
You need to have loaded ANSI.sys or whatever the NT equivalent would be.
I would ask in some NT group about this.
/J\
--
Most women are so artificial that they have no sense of Art. Most men
are so natural that they have no sense of Beauty.
--
fortune oscar homer
------------------------------
Date: Mon, 8 May 2000 16:46:44 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: DIRHANDLE problems
Message-Id: <Pine.GSO.4.10.10005081646130.3921-100000@user2.teleport.com>
On Sun, 7 May 2000, Daniel Berger wrote:
> I take it passing a new value to opendir doesn't actually change the
> current working directory?
No; why would it? :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 8 May 2000 16:57:15 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: dynamic html
Message-Id: <Pine.GSO.4.10.10005081655100.3921-100000@user2.teleport.com>
On Mon, 8 May 2000, Jason Malone wrote:
> I noticed on Matts page that he has a couple of scripts that will let
> you emulate SSI's on servers that do not support it. I haven't used
> them but
Most folks around these here parts don't hold Matt's scripts in high
esteem. I'm not judging the quality of the programs you speak of, but I am
saying that, even when you can buy the program for the price of
downloading it, it's still a case of "buyer beware".
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 8 May 2000 17:30:12 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: file permisions- setuid?
Message-Id: <Pine.GSO.4.10.10005081727440.3921-100000@user2.teleport.com>
On Mon, 8 May 2000, Veronica Adams wrote:
> I have a function that needs to write to a file(called from a browser
> as as cgi script). I do not want to leave the file permission 0777
> (the function also needs to read).
Why 0777 for a data file? 0666 would be better, even though it still
sounds evil. :-) But you're right, it shouldn't be world-writable if you
can avoid it.
> I need to change the permission for the duration of the function call.
> I trided just chmod in the function but evidently the host will not
> allow me to do this.
If your process isn't the owner of the file, you won't be able to change
the permissions. (Otherwise, what's the point of permission bits?)
> Will setuid do what I need to do? If so how do I use it? WHat is it?
> Where can I find documentation?
Yes; see the perlsec manpage. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 08 May 2000 22:09:54 GMT
From: Kerry Shetline <kerry@shetline.com>
Subject: Re: Getting variables from html
Message-Id: <8f7dv6$7ij$1@nnrp1.deja.com>
In article <Pine.GHP.4.21.0005081925070.3709-100000@hpplus01.cern.ch>,
"Alan J. Flavell" <flavell@mail.cern.ch> wrote:
> > elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
> > my $buffer;
> > read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>
> It might not be wise to read in arbitrary quantities of content
> without futher thought... (and then there's the question of binmode,
> and different submission codings, and all).
I'm not exactly sure what ill effects I (or the server) would suffer from
being swamped with too much data, but limiting the data is probably a good
point. So is using standard Perl libraries instead of this other code, for
that matter -- something I wouldn't dispute, although from your tone you
sound like you think I would.
I'm just started teaching myself Perl a couple of weeks ago. Until I gain
more personal experience and expertise, I'm pretty much at the mercy of
what's it the books I'm reading, as well as what I pick up online -- what I
posted came straight out of a Perl book I bought, with only slight
modification.
> [much more hand-knitting omitted]
>
> > $value =~ s/<!--(.|\n)*-->//g;
>
> Hello, where did that piece of cargo crawl in from?
I'd wondered about that myself. The point of this "cargo" seems to be to
remove HTML comments embedded in submitted data, presumably because a
server-side include might be embedded within the comment, and if you echo
back the parsed value without stripping out the comments a Trojan Horse SSI
could be executed. This safety measure seems to presume that the CGI output
would undergo parsing before being sent to the client -- which seems doubtful
to me, but I guess the idea is "better paranoid than sorry."
> CGI.pm has years of expertise behind it, it's been peer reviewed...
[more grousing snipped]
No argument here. It would be one thing if I'd posted that code as God's Own
Perfect Perl Solution, but I didn't. I simply offered some code from a book I
have as a possible answer, nothing more. I'm delighted that there's a better,
shorter, safer way.
> > [PS: My apologies if this message is repeated when my ISP fixes it's news
> > server!]
>
> Oh, it's its, not it's.
I understand the grammatical difference between a contraction and a
possessive. Sometimes I type "you're" when I mean "your", "here" when I mean
"hear", and "their" when I mean "there" as well. Doesn't mean I don't know
the difference. If I'd been pontificating, you might have a reason to
nit-pick with me, but I hadn't been.
If you had something better to do than nit-pick, you might have even
mentioned what CGI lib functions to use to help answer the original poster's
question. Too helpful for you today? Here's what someone else posted:
#!/usr/bin/perl -w
use CGI::Carp qw(carpout fatalsToBrowser);
use CGI qw(:standard);
use diagnostics;
use strict;
my $var1 = param('value');
my $var2 = param('value2');
She did let out a "*GASP*" over my long blob of code, probably well deserved,
but you could learn something from this much more useful response.
-Kerry
-----------------------------------------------------------------------
See the stars (and Sun, and Moon, and planets) at the Sky View Cafe...
http://www.shetline.com/skyview.html
-----------------------------------------------------------------------
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 08 May 2000 16:36:13 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Getting variables from html
Message-Id: <39174F6D.458921F1@vpservices.com>
Kerry Shetline wrote:
>
> I'm just started teaching myself Perl a couple of weeks ago. Until I gain
> more personal experience and expertise, I'm pretty much at the mercy of
> what's it the books I'm reading, as well as what I pick up online
We were all in that same boat when we started learning, so no harm
there. The various gasps and grouses you heard in response to your
posted code came because code similar to that is posted here about once
a week and its problems have been explained repeatedly and at length in
this newsgroup. So, please don't take it personally if people's tone
was a bit exasperated, the exasperation was aimed at the continual
reappearance of this bad code, not at you.
This newsgroup has a reputation of being unfriendly and your first taste
may lead you to agree. Please stick with us a bit further and I think
you'll find us not such a bad crowd. Some things that might help you
get acclimated to us (or maybe it would mainly help us get acclimated to
you, but that's not such a bad thing either): 1) lurk a bit and see
how others answer questions and what response those answers receive so
you get an idea of the level of accuracy that is expected here. The
level is fairly high and even seasoned Perl programmers find their
answers critiqued. That's not punishment, it's something we expect of
each other. 2) look back through the archives of the newsgroup on
www.dejanews.com to see what kinds of topics come up repeatedly and what
has been said about them. 3) When you are posting an answer to someone
else's question you might preface it with a statement of your level of
certainty about your answer. Generally passing on some code you've
copied from somewhere else is not the best idea unless you are
simultaneously asking "here's something that has worked for me, is this
a good way to do it?" because, as it turns out, there are lots of
things which work in situations X and Y but blow up spectacularly in
situation Z and it is not really a help to anyone to simply pass on code
fragments without understanding their implications.
None of that is to excuse rude behavior. If people are rude, please
call them on it. If I am rude, please throw a pie in my face.
Anyway, welcome to clpm, we look forward to your contributions.
--
Jeff
------------------------------
Date: Tue, 9 May 2000 02:02:17 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Getting variables from html
Message-Id: <Pine.GHP.4.21.0005090149230.3709-100000@hpplus01.cern.ch>
On Mon, 8 May 2000, Kerry Shetline wrote:
> I'm not exactly sure what ill effects I (or the server) would suffer from
> being swamped with too much data,
It's called "denial of service attack".
> > > $value =~ s/<!--(.|\n)*-->//g;
> >
> > Hello, where did that piece of cargo crawl in from?
>
> I'd wondered about that myself. The point of this "cargo" seems to be to
> remove HTML comments embedded in submitted data,
I sense a difference in mental models here...
> presumably because a
> server-side include might be embedded within the comment,
Er, the contents of a textarea are textual data. Textual data is
entirely harmless if you handle it right; it's only if you start
interpreting it in some way that it gets to be dangerous. And if you
plan to allow potentially hostile textarea input to be interpreted as
arbitrary HTML, then you've plenty to worry about. So don't do that.
> would undergo parsing before being sent to the client -- which seems doubtful
> to me, but I guess the idea is "better paranoid than sorry."
Absolutely. So don't send it back to the client without proper
treatment. Which the above piece of cargo certainly wasn't. It's
entirely the wrong level of abstraction, IMO.
> If you had something better to do than nit-pick, you might have even
> mentioned what CGI lib functions to use to help answer the original poster's
> question. Too helpful for you today?
CGI.pm comes with pretty good documentation. I'd rather have people
refer to that (and come back with any relevant questions) than I would
care to risk typing errors re-iterating it. I hope you'd do the same
for me.
------------------------------
Date: Mon, 08 May 2000 21:01:15 -0400
From: Kerry Shetline <kerry@shetline.com>
Subject: Re: Getting variables from html
Message-Id: <3917635B.1DE21C08@shetline.com>
Jeff Zucker wrote:
> Anyway, welcome to clpm, we look forward to your contributions.
Thanks for the welcome/warning... and don't worry. It's a veritable
love-fest here compared to some newsgroups I've been in :)
Will it endear me to the locals if I say I beginning to think Perl isn't
*quite* so ugly as I used to think it was? ;-)
-Kerry
----------------------------------------------------------------------
See the stars (and Sun, and Moon, and planets) at the Sky View Cafe...
http://www.shetline.com/skyview.html
----------------------------------------------------------------------
------------------------------
Date: Sat, 6 May 2000 16:38:25 +0100
From: "Andy Chantrill" <andy@u2me3.com>
Subject: goto function
Message-Id: <8f1e9o$jvn$1@plutonium.btinternet.com>
Hey,
Anybody know of a way I can use the goto function (or something similar, if
it exists?) to hop out of one sub-routine, and into another?
Thanks, Andy.
andy@u2me3.com
------------------------------
Date: Mon, 08 May 2000 23:24:46 GMT
From: "RC" <hmmidi@geocities.com>
Subject: help on code. thanks a lot.
Message-Id: <21IR4.55236$WF.3044581@bgtnsc04-news.ops.worldnet.att.net>
Helo Perl People.
I am one of the new perl learners out there.
I have been writing some new perl code and I come with a unsolved problems.
After doing some brain storming I could not find a way to solve it. maybe
its my perl skill that is lacking =) anyway if someone could help me, I
appreciate your effort ;).
this is a simplified code to make it simple looking ; might be wrong as I am
a beginner
foreach ($a, $b; $a < 10; $a+) {
$variableone .= "<html><title>Libr</title><body>";
$variableone .= "<b>$a</b><br>";
$variableone .= "<b>book list</b>";
$variableone .= "</body></html>";
open (variableone,">$pathroot/$filename");
print vaariableone $variableone;
close (variableone);
}
I am thinking of making the value of variableone to be easily modified.
therefore I try putting the hypertext code in something.txt file which I
could easlily modify through a form., next I do an open file of the text
file something.txt and have them between the perentheses. What happen was
that the variable $a was not interpreted by perl. instead $a was printed
out. hmm..anyone could suggest an idea. thanks a lot.
c ya
------------------------------
Date: Mon, 08 May 2000 13:25:20 +0200
From: Daniel Garcia Fernandez <danielg@tid.es>
Subject: Help with Win32::Tie Registry
Message-Id: <3916A420.8793F055@tid.es>
This is a multi-part message in MIME format.
--------------717F73E4D0A2999217ECAD9F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I'm trying to get some values out of the registry and I never get
anything using the examples on perldoc. Can anyone post me an example or
a site with help??
Thanks
--------------717F73E4D0A2999217ECAD9F
Content-Type: text/x-vcard; charset=us-ascii;
name="danielg.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Daniel Garcia Fernandez
Content-Disposition: attachment;
filename="danielg.vcf"
begin:vcard
n:García;Daniel
tel;work:983-367798
x-mozilla-html:FALSE
org:Telefonica I+D;Tecnologia Multimedia
adr:;;;;;;
version:2.1
email;internet:danielg@tid.es
title:<img src="http://tid/images/telefonica.gif">
fn:Daniel Garcia
end:vcard
--------------717F73E4D0A2999217ECAD9F--
------------------------------
Date: Mon, 08 May 2000 16:18:56 -0600
From: Michael Roinestad <michaelr@apgtest.com>
Subject: Re: How do I use a dll ?
Message-Id: <39173D50.489E67D2@apgtest.com>
>> Please don't post in HTML.
Sorry
>> Get the Win32::API module from Acivestate's PPM repository
>> (<http://www.activestate.com/packages/>) and install it. Then check out
>> the docs on how to call functions from a DLL. The docs indicate that
>> it's main purpose is to use Windows' own API functions, but I believe it
>> ought to work with any custom DLL (save ActiveX).
>> >From CFuncs.h
>> >long ChkNumber(long xNumber, char *Filter);
>> It takes a number and a pointer to a string, and returns a number. So,
>> declare the function with qw(N P) as parameter types and 'N' as return
>> value type. That should do it. I hope.
That worked thank very much,
Bart Lateur wrote:
> Michael Roinestad wrote:
>
> ><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> ><html>
>
> Please don't post in HTML.
>
> >How would I go about using an exported function
> >from a dll in perl? It's needed to run in the NT 4.0(service
> >pack 6 if it matters) enviroment. The particular function I am trying
> >to access resides in CFuncs.dll that has an exported function called ChkNumber
> >that returns a number and requires a long and a string as an argument.
>
> Get the Win32::API module from Acivestate's PPM repository
> (<http://www.activestate.com/packages/>) and install it. Then check out
> the docs on how to call functions from a DLL. The docs indicate that
> it's main purpose is to use Windows' own API functions, but I believe it
> ought to work with any custom DLL (save ActiveX).
>
> >From CFuncs.h
> >long ChkNumber(long xNumber, char *Filter);
>
> It takes a number and a pointer to a string, and returns a number. So,
> declare the function with qw(N P) as parameter types and 'N' as return
> value type. That should do it. I hope.
>
> --
> Bart.
------------------------------
Date: 9 May 2000 00:59:40 GMT
From: The WebDragon <nospam@devnull.com>
Subject: HTTP::Request=HASH(0x7bb141c) ?
Message-Id: <8f7nts$9pv$0@216.155.33.35>
#!perl
use strict;
use diagnostics -verbose;
require HTTP::Request;
my $errormsg;
my $request = new HTTP::Request 'GET',
"http://www.webdragon.net/default.htm";
if ($!) {
$errormsg = "$!";
print "$errormsg";
};
if (!$errormsg) {
open(OUT, ">:get_files:default.htm");
print OUT "$request";
close OUT;
}
why does $request only contain "HTTP::Request=HASH(0x7bb14ac)" at output
time?
if it's a hash, shouldn't I be using %request instead ? or do I totally
misunderstand this.
also this script returns "no such directory or file" quite often.
obviously there has to be a better way to do this, however the
documentation in these files is pretty sketchy
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Mon, 08 May 2000 22:06:02 GMT
From: itsamoomoo@my-deja.com
Subject: LWP documentation
Message-Id: <8f7dnv$7aa$1@nnrp1.deja.com>
Where can I get it? Clinton Wong's Web Client Programming is out of
print. I need more than perldoc which assumes I know the protocol.
All I need is some basic information on how to do a simple form
submission using post method. I'd appreciate any pointer to good
documention.
TIA
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 08 May 2000 15:38:20 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: LWP documentation
Message-Id: <391741DC.3013C683@My-Deja.com>
> Where can I get it? Clinton Wong's Web Client Programming is out of
> print. I need more than perldoc which assumes I know the protocol.
>
perldoc LWP
perldoc HTTP::Request::Common
Article:
" Working with LWP" - by Reuven M. Lerner
that appeared in Linux Journal (Nov, 1999).
http://www2.linuxjournal.com/lj-issues/issue67/3673.html
--
------------------------------
Date: Mon, 8 May 2000 18:56:33 -0600
From: "John Keiser" <john@ieffects.com>
Subject: Mail::Mailer not setting from?
Message-Id: <zoJR4.659$tb6.66177@news.uswest.net>
Hey, gang, I'm having trouble getting this script to set the From field in
my email. Everything else appears to be working. I looked around in the
docs and decided to try 'MailFrom' as well, but that didn't work either. No
matter what, the From field in the email is set to my unix account.
The script:
use Mail::Mailer;
$msg = new Mail::Mailer;
$fh = $msg->open({
From => 'Weird guy <tony@ieffects.com>',
To => 'John Keiser <john@ieffects.com>',
Subject => 'This is just a test.'
});
print $fh "This is a test.\nThis is only a test.\n";
$fh->close;
Can anyone see problems? Suggestions?
Thanks.
--John Keiser
------------------------------
Date: 9 May 2000 00:19:08 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: making a package (NOT a module)
Message-Id: <8f7lhs$2kh$2@216.155.32.145>
In article <slrn8he9hk.dia.tadmc@magna.metronet.com>,
tadmc@metronet.com (Tad McClellan) wrote:
| On Mon, 08 May 2000 17:37:59 GMT, sirena_b@my-deja.com
| <sirena_b@my-deja.com> wrote:
|
| >I thought a package was for
| >calling one script from another, but apparently
| >not.
|
|
| a "package" is nothing more than a "namespace".
|
| A "namespace" (and hence packages) have nothing to do
| with "calling one script from another".
|
| They _do_ have to do with calling _functions_ in one file
| from a program in another file though.
on that thought, does it make sense to declare namespaces for cgi/perl
scripts running on webservers so that they don't step on each other, or
is that sort of unnecessary?
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Tue, 09 May 2000 00:30:54 GMT
From: joydip_chaklader@my-deja.com
Subject: Need help on displaying REMOTE_HOST
Message-Id: <8f7m7u$grr$1@nnrp1.deja.com>
I have developed a script for my hit counter the enviroment variables
are displaying properly except the remote host.
http://www.hitostat.com/cgi-bin/hit.pl
the programme is in this url
http://www.hitostat.com/hit.html
I think server may not be configured to set the REMOTE_HOST variable
(it's a real drain on system resources to do a reverse DNS lookup for
every request). Now I am trying to use the REMOTE_ADDR variable
instead. I am trying set my scripts to check REMOTE_HOST, and if it's
empty,then using REMOTE_ADDR.
But then again my programme will be a hit counter for other sites
which will be giving site stastics ,it will be very poor if i cannot
provide the domain names of visitors to them.
I am just getting somewhere in the apache documentation that mod_perl.c
can be modified to display enviromental variables which was not
displayed.But I don't know exactly how to fix it up.
Can anybody give me some idea ?
Thanks in advance
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 08 May 2000 22:56:37 GMT
From: embern@my-deja.com
Subject: nt, perl, and smtp mail
Message-Id: <8f7gmu$akl$1@nnrp1.deja.com>
We are trying to get a perl cgi that previously used Unix's sendmail to
work on NT. WE ALREADY KNOW HOW TO GET MAIL WORKING WITH ASP'S BUT we
need to get it working with perl.
We've tried several methods:
I. Net::SMTP and Mail::Sendmail.
Pretend our development NT server is dev.ourserver.com. Our domain is
ourserver.com
Both Net::SMTP and Mail::Sendmail fail when we attempt to send mail to
ourserver.com
They do get the mail to the drop folder when we send mail to
dev.ourserver.com.
I feel like there is either a permission that needs to be set or that I
am missing some fundamental idea in the SMTP server idea. Any help
would be greatly appreciated.
II. CDONTS
This is also failing to send mail through. I submitted another email
to this list to find out if anybody else has been successful in the
implementation of CDONTS with Perl. Please let me know how you did it
if you got it to work. (I believe the problem is in permissions)
Thank you!
Ember
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 08 May 2000 22:45:36 GMT
From: embern@my-deja.com
Subject: perl and cdonts
Message-Id: <8f7g2d$9ut$1@nnrp1.deja.com>
We are trying to user the CDONTS com objects to send mail from a perl
CGI. We already can do it from an ASP, but for business reasons, we
need to do it from a perl script.
It doesn't give us any errors in the browser. But it does give us an
error in the application event log:
"The operating system was unable to load your profile. Please contact
your Network Administrator. (5)"
The cgi acts like it's working, and takes forever during the send
method, but it never sends the message.
Has anyone gotten CDONTS to work from a perl cgi? Are there special
permissions that need to be set?
Here is the relevant code:
use OLE;
my $mailobj = CreateObject OLE "CDONTS.NewMail";
$mailobj->Send($from,$sendto,$subject,$message);
$mailobj->Close;
In the deja archives someone had mentioned using Win32:OLE, but that
didn't work at all, it could not create the object.
Thank you for your help!
Ember
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 2983
**************************************