[13127] in Perl-Users-Digest
Perl-Users Digest, Issue: 537 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 15 06:07:13 1999
Date: Sun, 15 Aug 1999 03:05:06 -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, 15 Aug 1999 Volume: 9 Number: 537
Today's topics:
Re: How to protect perl script? (Ryan Ngi)
Re: HTTP redirect..not working (elephant)
IP <vrodo@gmx.net>
Re: IP <f00baz@my-deja.com>
Re: Nastiness contrary to the spirit of perl? (Malcolm Ray)
Splitting up huge codes.. <f00baz@my-deja.com>
Re: Tom Christiansen "Perl Cookbook" (Malcolm Ray)
Re: Tom Christiansen "Perl Cookbook" (-Sneex-)
Re: Unable to catch Perl errors into file on NT?? (elephant)
Re: Unable to catch Perl errors into file on NT?? <shmooth@yahoo.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 15 Aug 1999 09:42:09 GMT
From: ryanngi@hotmail.com (Ryan Ngi)
Subject: Re: How to protect perl script?
Message-Id: <37ae3e22.43990202@news.inet.co.th>
On Sun, 08 Aug 1999 10:59:35 GMT, jteens@my-deja.com wrote:
>Hello there,
>Sorry if this is off topic. I've cgi script running on my site and I
>don't want another host to run my cgi from their host. I try
>to protect my script by check HTTP_REFERER but they send fake
>HTTP_REFERER to my server so I can't block them. Any help would
>be mostly apreciated.
>Paul
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
1.why not ban REMOTE_ADDR of that's host ? but he can using any free
proxy to send instead of his host !
2.generate anyd random cookies in the fill form page and check if it
present when data sent , he will harder to do that job !
------------------------------
Date: Sun, 15 Aug 1999 18:21:36 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: HTTP redirect..not working
Message-Id: <MPG.12212396a98dd567989c24@news-server>
Arthur Cinader writes ..
>Here is what I am putting now:
>
>print "HTTP/1.0 302 Found\n";
>print "Location: http://www.foo.com/index.html\n\n";
>
>I'm getting the following error in my weblogs:
although this has already been answered .. I really can't resist posting
>apache: [Sat Aug 14 15:09:51 1999] [error] [client 204.90.78.7] [server
>www.foo.com] malformed header from script. Bad header=HTTP/1.0 302 Found:
>/htdocs/cgi-bin/fooform.cgi
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
you'd think this line in your own logfile would have tipped you off
Arthur .. these error log messages really don't get any more obvious
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Sun, 15 Aug 1999 10:15:21 +0200
From: "Vrodo" <vrodo@gmx.net>
Subject: IP
Message-Id: <7p5svs$ovq$1@public.ndh.net>
Hi
I have written a perl script and all I need to get it run perfectly is the
IP of the visitor of my homepage. I found in a documentary the
$ENV{'REMOTE_ADDR'} thing but it results only the ip of my server but not of
my visitor. How can I get this?
Thanx
--- Bastian ---
------------------------------
Date: Sun, 15 Aug 1999 09:21:34 GMT
From: F00 Baz <f00baz@my-deja.com>
Subject: Re: IP
Message-Id: <7p60qr$26v$1@nnrp1.deja.com>
In article <7p5svs$ovq$1@public.ndh.net>,
"Vrodo" <vrodo@gmx.net> wrote:
> Hi
> I have written a perl script and all I need to get it run perfectly
is the
> IP of the visitor of my homepage. I found in a documentary the
> $ENV{'REMOTE_ADDR'} thing but it results only the ip of my server but
not of
> my visitor. How can I get this?
> Thanx
>
> --- Bastian ---
>
Basti
$ENV{'REMOTE_ADDR'} should return you IP address of the machine, where
request was made from. if your server acts also as proxy, and your
users use it, you'll definetely have an IP addy of yer boxen there..
if this helps..
--
'oh, no, another day up?'
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 15 Aug 1999 09:18:52 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <slrn7rd1fs.k3m.M.Ray@carlova.ulcc.ac.uk>
On Sun, 15 Aug 1999 03:11:58 GMT, Id Est <id-est@home.com> wrote:
>In article <slrn7rc904.5k9.fl_aggie@thepentagon.com>, I R A Darth Aggie wrote:
>> Be a good little Usenaut, and answer all the newbie questions for the
>> next month.
>
>once i get as good as Abigail claims to be, i'll probably do just that.
You don't have to be as good as Abigail to answer FAQs or other simple
questions. I'm sure you'll have seen questions which you're capable of
answering.
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Sun, 15 Aug 1999 09:17:35 GMT
From: F00 Baz <f00baz@my-deja.com>
Subject: Splitting up huge codes..
Message-Id: <7p60jc$1ud$1@nnrp1.deja.com>
Hello people,
I came across sorta huge perl code, and I am thinking of splitting it
up into pieces, so I could easier maintain it, and here's what I am
wondering about:
the common way of performing such things is to have
require 'foobar.pl', right? or if I could put whole set of subbs into
package, I could save it as .pm, and have uses foobar.pm instead.
But I am curious if there're another quirks which would help me to
achieve the similar task? (one, I could think of, is :
open(FOO,"foobaz.pl") || die "yuk!";
eval $_ while(<FOO>);
close FOO;
but this looks abit overhelming..
I'd appreciate any hints.
F.B.
--
'oh, no, another day up?'
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 15 Aug 1999 09:11:42 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: Tom Christiansen "Perl Cookbook"
Message-Id: <slrn7rd12e.k3m.M.Ray@carlova.ulcc.ac.uk>
On Sun, 15 Aug 1999 17:32:02 +1000, elephant <elephant@squirrelgroup.com>
wrote:
>support@gethits.com writes ..
>>Malcolm Ray wrote:
>>>
>>> On Fri, 13 Aug 1999 09:56:00 -0400
>>
>>> Sometimes even the best books are wrong! When there's a discrepancy,
>>> always trust the module's own documentation.
>>
>>Thanks for confirming this. After multiple tests using both
>>codes, I had to come to the conclusion that the book must
>>be wrong since the module's author's method worked and "Cookbook's"
>>didn't (everything else remaining constant of course). Even
>>the great ones can err!
>
>both methods still work on my machines
Hmm. What version are you using? I used Mail::Mailer 1.18, from
MailTools 1.13.
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Sun, 15 Aug 1999 05:31:27 -0400
From: bill@fccj.org (-Sneex-)
Subject: Re: Tom Christiansen "Perl Cookbook"
Message-Id: <150819990531264319bill@fccj.org>
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
On Date: Sun, 15 Aug 1999 17:32:02 +1000
elephant@squirrelgroup.com (elephant) wrote:
> support@gethits.com writes ..
> >Malcolm Ray wrote:
> >
> >> Sometimes even the best books are wrong!
> >
> >Thanks for confirming this.
>
> both methods still work on my machines
>
As they do on mine...
Funny,
-Sneex- :]
------------------------------
Date: Sun, 15 Aug 1999 18:42:16 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Unable to catch Perl errors into file on NT??
Message-Id: <MPG.12212874ba934a16989c25@news-server>
Shmooth writes ..
> ...I can't seem to catch the output of my faulty
>perl prog. How to do?
>
>I've tried:
>
>> faulty.pl >out.txt 2>&1
>
>I end-up with an 'out.txt' with nothing in it.
this is because the file association that your registry contains grabs
everything following a .pl file as command line args for the program
rather than leaving them for the shell to interpret
you'll want to allow the shell to have those file-descriptor redirectors
by taking the .pl file association out of the equation thusly (btw - I
believe that the splain documentation uses this calling format - one
wonders why you didn't try it as it was in the documentation)
perl faulty.pl >out.txt 2>&1
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Sun, 15 Aug 1999 08:55:38 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Re: Unable to catch Perl errors into file on NT??
Message-Id: <37B67F53.FF6301B1@yahoo.com>
> by taking the .pl file association out of the equation thusly (btw - I
> believe that the splain documentation uses this calling format - one
> wonders why you didn't try it as it was in the documentation)
>
documentation, shmocumentation....what's it good fer anyway??!!
thanks!
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
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 537
*************************************