[12772] in Perl-Users-Digest
Perl-Users Digest, Issue: 182 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 18 13:07:30 1999
Date: Sun, 18 Jul 1999 10:05:09 -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, 18 Jul 1999 Volume: 9 Number: 182
Today's topics:
Re: Accessing a MS Access Database (Marcel Grunauer)
Re: Accessing a MS Access Database <dmb197@zepler.org>
Re: Anyone intrested in joining a group? (Marcel Grunauer)
Re: auto ftp (Marcel Grunauer)
Re: Can a .html file be executable? (Tad McClellan)
Re: Can a .html file be executable? (Marcel Grunauer)
Re: Can a .html file be executable? <scientia@XXXtechnologist.com>
Re: Can a .html file be executable? (Michel Dalle)
Re: Can a .html file be executable? <rick.delaney@home.com>
Re: Can a .html file be executable? (Ronald J Kimball)
Re: Closing Web Browser Connection on Lengthy Processes <flavell@mail.cern.ch>
Re: Closing Web Browser Connection on Lengthy Processes bane_dewitt@my-deja.com
compliled perl in a client-server production environmen (Eric Smith)
Re: compliled perl in a client-server production enviro (Marcel Grunauer)
Re: Future of Perl <revjack@radix.net>
Re: HHHHEEEEEEELLLLLLPPPPPPP!!!!!!!!!! (Marcel Grunauer)
Re: How can I do a case insensitive search? (J. Moreno)
How do I check if the server have DBI or DBD:ODBC insta <c8133594@comp.polyu.edu.hk>
Re: How do I check if the server have DBI or DBD:ODBC i (Marcel Grunauer)
Re: How to disable auto-loading? <lichtin@bivio.com>
Re: I can't find this one in the FAQ. <flavell@mail.cern.ch>
Re: I can't find this one in the FAQ. (Ronald J Kimball)
Re: Keeping competitors out (Rich)
Re: Keeping competitors out <jonz@rmi.nospam.net>
Re: Keeping competitors out (I R A Aggie)
Re: Looking for Online Regex Test Form (Marcel Grunauer)
Re: newbie needs help! <gilmanb@vuser.union.edu>
Re: newbie needs help! <uri@sysarch.com>
Re: pure perl solution for Blowfish, DES or IDEA? (J. Moreno)
Re: Question for the perl gods (Tad McClellan)
Re: Regular expression question (Problems with parsing <uri@sysarch.com>
Re: Seeking for a page maintainer for the Cetus Links (Marcel Grunauer)
Re: Some more benchmark results: (Marcel Grunauer)
Re: String (Tad McClellan)
Re: String (Marcel Grunauer)
When can a CGI execute the CHMOD command gibsea@hotmail.com
Re: When can a CGI execute the CHMOD command <rick.delaney@home.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 18 Jul 1999 14:28:34 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Accessing a MS Access Database
Message-Id: <3798e458.1530320@enews.newsguy.com>
On Sat, 17 Jul 1999 20:58:01 -0400, Tom Kralidis
<tom.kralidis@ccrs.nrcanDOTgc.ca> wrote:
>How can access a .mdb from Perl?
Using ActiveState's Perl, just use the PPM to install DBI and
DBD::ODBC. In the documentation of those modules you'll find a lot of
examples (they basically involve creating a DSN for the .mdb).
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 16:39:18 +0100
From: "Dylan Beattie" <dmb197@zepler.org>
Subject: Re: Accessing a MS Access Database
Message-Id: <932312407.1167.0.nnrp-03.d4e4756e@news.demon.co.uk>
Sam Holden <sholden@pgrad.cs.usyd.edu.au> wrote in message
news:slrn7p2auq.een.sholden@pgrad.cs.usyd.edu.au...
> On Sat, 17 Jul 1999 Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca> wrote:
> >How can access a .mdb from Perl?
>
If you're running Win32 (which I kind of assume you are, since Access isn't
on Linux yet AFAIK :) ), the Win32::ODBC module has everything you need
apart from the ODBC drivers which come with Access. First off, you need to
install a system ODBC data source under Control Panel->ODBC - there should
be a driver which will allow you to create a data source pointing straight
to a .MDB file. Once the data source is working OK, it's really
straightforward. Search CPAN for ODBC or alternatively get the module from
http://www.roth.net/perl/odbc/
One more thing - if you're using ActivePerl, it's easier to use their PPM
package or download the file from
http://www.activestate.com/packages/zips/Win32-ODBC.zip
and then use PPM to install it once it's unzipped. It comes with pretty
comprehensive docs, so as long as you take the time to look through them it
should be plain sailing!
Hope this helps.
Cheers,
D.
--
=====================================================
Dylan M. Beattie dmb197@zepler.org
Computer Science, University of Southampton, England
http://www.zepler.org/~dmb197/ ICQ:34865704
=====================================================
------------------------------
Date: Sun, 18 Jul 1999 14:27:27 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Anyone intrested in joining a group?
Message-Id: <3797e3a5.1351242@enews.newsguy.com>
>We would basiclly be making CGI scripts for
>those that need them for a small price. So far there is no group name, and
>once we start to get going I hope to get a top-level domain.
Yeah, top-level domains are dime a dozen these days. Just the other
day a bucnh of kids registered the .html TLD. I wish I had thought of
that... Now instead of retrieving a local .html file, it has to go
through a DNA server (the kids didn't like DNS either).
You'll make lots of money, I'm sure.
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 14:20:31 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: auto ftp
Message-Id: <3794e286.1064610@enews.newsguy.com>
On Sun, 18 Jul 1999 08:15:41 GMT, cnsxxx09@my-deja.com wrote:
>Hi
>
>Is there a module that will let me auto-ftp a file?
Net::FTP
>I want to be able to run (or schedule) a perl program to automatically
>upload a file to my web-server, without requiring any interaction.
cron (Unix)
at (NT)
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 05:34:53 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Can a .html file be executable?
Message-Id: <t37sm7.go.ln@magna.metronet.com>
Scientia (scientia@XXXtechnologist.com) wrote:
: for reasons that is would be impossible to explain here,
: I should make a certain file.html executable:
That should be no problem.
_perl_ does not care what the scripts are named.
: I can't change its name to file.cgi .
: Of course I could make a HTML redirection from such file
: to a executable cgi file.
Sounds like you are really asking if a WWW server can be
configured to pay attention to a particular filename
extension.
That is not a Perl question, it is a WWW server question.
You should ask WWW server questions in a WWW server newsgroup:
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 18 Jul 1999 14:16:24 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Can a .html file be executable?
Message-Id: <3792e140.738842@enews.newsguy.com>
On Sun, 18 Jul 1999 14:41:00 -0700, Scientia
<scientia@XXXtechnologist.com> wrote:
>Hello
>
>for reasons that is would be impossible to explain here,
>I should make a certain file.html executable:
>I can't change its name to file.cgi .
>
>Of course I could make a HTML redirection from such file
>to a executable cgi file.
>However I would like to know if it is possible somehow to make
>it executable itself, although it has a .html extension
chmod 755 file.html
And ask in alt.rec.sky-diving, they might care.
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 18:05:23 -0700
From: Scientia <scientia@XXXtechnologist.com>
Subject: Re: Can a .html file be executable?
Message-Id: <379279D3.7E0B@XXXtechnologist.com>
Hello.
I try to explain better my problem.
The question IS about Perl, because I need to make
a CGI program in Perl in a certain file.
But (for reasons too long to explain) I must call this file
something.html! I can't call it something.cgi or something.pl!
So, when a browser finds this file.html , it does not execute it
but writes only the text! It can't understand that it is a Perl program
and considers it as a html/text.
So, my question was:
is it possible to make it run (somehow) even though its name
remains .html?!
Thanks.
Here is my previous message:
> Hello
>
> for reasons that is would be impossible to explain here,
> I should make a certain file.html executable:
> I can't change its name to file.cgi .
>
> Of course I could make a HTML redirection from such file
> to a executable cgi file.
> However I would like to know if it is possible somehow to make
> it executable itself, although it has a .html extension
>
> Thanks
> Fabrizio
> scientia@technologist.com
------------------------------
Date: Sun, 18 Jul 1999 16:49:44 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Can a .html file be executable?
Message-Id: <7mt0hf$nn1$1@xenon.inbe.net>
In article <379279D3.7E0B@XXXtechnologist.com>, Scientia <scientia@XXXtechnologist.com> wrote:
[snip]
>So, when a browser finds this file.html , it does not execute it
>but writes only the text! It can't understand that it is a Perl program
>and considers it as a html/text.
What you may not have understood yet is that it is NOT the browser
who will execute anything, but the webserver.
Ask your webmaster for more information. If you are your own webmaster,
read the manual of your webserver about CGI, and how to configure it.
Michel.
------------------------------
Date: Sun, 18 Jul 1999 16:55:01 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Can a .html file be executable?
Message-Id: <379206B8.B57FB5AE@home.com>
[posted & mailed]
Scientia wrote:
>
> Hello.
>
> I try to explain better my problem.
>
> The question IS about Perl, because I need to make
> a CGI program in Perl in a certain file.
If you were making a CGI program in Tcl in a certain file I think that
the question would be the same. Does this mean this question belongs in
a Tcl group?
> But (for reasons too long to explain) I must call this file
> something.html! I can't call it something.cgi or something.pl!
>
> So, when a browser finds this file.html , it does not execute it
> but writes only the text! It can't understand that it is a Perl program
> and considers it as a html/text.
Browsers don't execute CGI programs, web servers do.
> So, my question was:
> is it possible to make it run (somehow) even though its name
> remains .html?!
Of course, since perl doesn't care what you name your files. If you
want to get your web server to run it then you should check the docs,
FAQs and newsgroups about web servers.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Sun, 18 Jul 1999 13:01:27 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Can a .html file be executable?
Message-Id: <1dv52k1.ll0yeyxhm9v4N@p29.tc9.metro.ma.tiac.com>
Scientia <scientia@XXXtechnologist.com> wrote:
> I try to explain better my problem.
>
> The question IS about Perl, because I need to make
> a CGI program in Perl in a certain file.
>
> But (for reasons too long to explain) I must call this file
> something.html! I can't call it something.cgi or something.pl!
>
> So, when a browser finds this file.html , it does not execute it
> but writes only the text! It can't understand that it is a Perl program
> and considers it as a html/text.
Browsers never execute CGI programs. *Servers* execute CGI programs.
Since your filename ends in .html, your web server assumes, as it
should, that this is an HTML file, not a CGI program.
> So, my question was:
> is it possible to make it run (somehow) even though its name
> remains .html?!
It depends entirely on your server, and not on Perl. You should ask in
a newsgroup about web servers. Tad suggested several in his response.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 18 Jul 1999 16:17:14 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Closing Web Browser Connection on Lengthy Processes
Message-Id: <Pine.HPP.3.95a.990718161416.7013H-100000@hpplus03.cern.ch>
I'm sorry, I realise now that I responded to a thread f'up without being
aware of what went before. Which means that I've nothing useful to add,
but as I seem to be unsuccessful with Cancels, I'm posting a Supersedes.
Apologies all round.
On Sun, 18 Jul 1999, Alan J. Flavell wrote:
[trampled]
------------------------------
Date: Sun, 18 Jul 1999 15:55:25 GMT
From: bane_dewitt@my-deja.com
Subject: Re: Closing Web Browser Connection on Lengthy Processes
Message-Id: <7mstda$4ve$1@nnrp1.deja.com>
In article <7msmbn$h4c$1@xenon.inbe.net>,
michel.dalle@usa.net (Michel Dalle) wrote:
> In article <7msi36$23t$1@nnrp1.deja.com>, bane_dewitt@my-deja.com
> wrote:
> [snip]
> >This does not seem to yield the intended results on my system (UNIX
> >System V Release 4.0, perl version 5.005_02 built for sun4-solaris).
> >It prints the "Away we go" text, but the connection persists, does
> >not close.
>
> How do you check this ? By looking at the 'Stop' button of your
> browser, or because it doesn't tell you 'Done' in the status line ?
That, and telnetting to port 80 and GETting the output results in the
HTML being sent, then a long wait (I changed it to 120 seconds) before
the server closes the connection ("Connection closed by foreign host.")
I'm just wondering how to close that connection when programming in
perl. Excite for Web Servers software does it (using perl), I guess
I'll try and reverse engineer their code. Don't anyone hold their
breath. :)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 18 Jul 1999 16:03:00 GMT
From: eric@fruitcom.com (Eric Smith)
Subject: compliled perl in a client-server production environment
Message-Id: <slrn7p3um5.jsm.eric@plum.fruitcom.com>
--
Eric Smith
<eric@fruitcom.com>
www.fruitcom.com
Tel. 021 423 6111
The Information contained in this e-mail and any subsequent
correspondence is private and is intended solely for the
intended recipient(s). For those other than the intended
recipient any disclosure, copying, distribution, or any
action taken or omitted to be taken in reliance on such
information is prohibited and may be unlawful.
------------------------------
Date: Sun, 18 Jul 1999 16:07:16 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: compliled perl in a client-server production environment
Message-Id: <3793fb85.7463011@enews.newsguy.com>
On 18 Jul 1999 16:03:00 GMT, eric@fruitcom.com (Eric Smith) wrote:
Did you forget to write an actual message? Because the subject alone
doesn't really mean anything.
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: 18 Jul 1999 15:29:59 GMT
From: revjack <revjack@radix.net>
Subject: Re: Future of Perl
Message-Id: <7msrtn$e4f$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight
Rich explains it all:
: I *always* check the USENET posting history of people who
:I am considering for employment. I'm certainly not alone in this
:practice.
What do you do about forgeries? My DejaNews posting history has many
offensive articles forged in my name, for example. Do you have an accurate
method for checking one's usenet posting history?
------------------------------
Date: Sun, 18 Jul 1999 14:19:38 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: HHHHEEEEEEELLLLLLPPPPPPP!!!!!!!!!!
Message-Id: <3793e208.938629@enews.newsguy.com>
On Sat, 17 Jul 1999 23:46:37 -0400, "cshelby" <cshelby@mindspring.com>
wrote:
>Ok, here's the deal....
>I have tired (key word is tired!) to write a script for forms. Well, for
>some reason it shows a misconfig error, and it sends the E-mail in hex, I
>have included the script and the subform script at the bottom, if you see
>any errors sticking out, PLEASE let me know! Thanks for everything in
>advance....
[snip pointlessly long and boring code]
Why do you do the decoding yourself? Use CGI.pm. It might be that your
problem lies in decoding the form data. See the documentation for
CGI.pm for examples.
And try to keep the code to about 40 lines or so, the ones you think
are giving you trouble.
And choose a more descriptive subject.
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 12:58:48 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: How can I do a case insensitive search?
Message-Id: <1dv4f61.ejjb1f1ogenpeN@roxboro0-0021.dyn.interpath.net>
Larry Rosler <lr@hpl.hp.com> wrote:
> + --
>
> If you add a magic invisible space after those two dashes, then
> competent newsreaders such as mine won't repost your signature, which in
>
> any case violates Usenet conventions by being 8 lines long instead of 4
> or fewer.
Sorry Larry,
But he is using that greatest of all newsreaders (Outlook Express 5) and
so the only way he can have the space is to post in Quoted-Printable,
that combined with including improperly quoted text might get him
laughed at.
I of course, understand his difficulties in trying to deal with the
pedestrians who wouldn't recognize a great newsreader if it bit them on
the ass -- you know the kind, those who think that html is evil and that
having a blinking neon pink button where you think the problem is
wouldn't be handy, even if it does require an extra 30k of junk to be
sent, over the simple "(problem here?)" solution.
(For those of you who have had your eyes removed and can't tell the
difference between sarcasm and utterly serious utterings when you see
it, yes I am dumb enough to believe the above. It helps that I have had
not one but two lobotomies, but you too will one day agree with me).
--
John Moreno
------------------------------
Date: Sun, 18 Jul 1999 23:24:42 +0800
From: Carfield Yim <c8133594@comp.polyu.edu.hk>
Subject: How do I check if the server have DBI or DBD:ODBC installed?
Message-Id: <3791F1BA.A0AF87AE@comp.polyu.edu.hk>
As title, I don't know whether can I use these function.
------------------------------
Date: Sun, 18 Jul 1999 16:09:34 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: How do I check if the server have DBI or DBD:ODBC installed?
Message-Id: <3794fbd4.7542826@enews.newsguy.com>
On Sun, 18 Jul 1999 23:24:42 +0800, Carfield Yim
<c8133594@comp.polyu.edu.hk> wrote:
>As title, I don't know whether can I use these function.
Help yourself to ms-env.pl by Dave Cross, at
http://www.mag-sol.com/Download.html.
Upload that to your server and execute it (i.e. from the browser).
Then (if the server has CGI.pm installed - and if it hasn't, run,
don't walk to a different ISP), you should see a list of modules
installed on that server.
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 18:26:23 +0200
From: Martin Lichtin <lichtin@bivio.com>
Subject: Re: How to disable auto-loading?
Message-Id: <3792002F.4503E0C0@bivio.com>
Benjamin Franz wrote:
> I'm failing to comprehend *why* you would want such a thing.
To reduce state changes after startup in servers.
> which use AUTOLOAD to improve runtime performance.
AUTOLOAD only improves run-time performance of transient programs.
It degrades reliability of servers by introducing unnecessary
transient state.
> It is somewhat
> akin to saying "I'd like to avoid inheritance. Is there anyway I
> can build (name favorite OO language) without that feature?"
Since the purpose of AUTOLOAD is to improve the performance of
perl programs, it should be a configurable option just like -O of
cc. It should be completely transparent like inheritance, but unlike
inheritance it should not change program function.
> tends to break things to chop core functionality out of a language
> in general. And even if you *did* manage to turn off AUTOLOAD,
> you would still have 'do', 'require' and 'eval' to deal with.
Even though -O is "core functionality" of cc, it can be turned on/off
without breaking the code. We have all run into compilers which
do not implement -O correctly. This is not deemed a "feature".
Linux, Tcl, emacs, and other systems have dynamic module loading.
Whether you load dynamically or statically is determined by the
system configuration, not the clients of the modules. Just as
a perl installer determines whether to compile perl with or without
-static, not the perl programs themselves.
All I desire is a perl configuration or run-time switch to turn
off AUTOLOAD. Is this not possible?
------------------------------
Date: Sun, 18 Jul 1999 16:32:07 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: I can't find this one in the FAQ.
Message-Id: <Pine.HPP.3.95a.990718162948.7013I-100000@hpplus03.cern.ch>
On Sat, 17 Jul 1999, oronet Tech - Joshua Scott wrote:
> > > print $query->redirect('http://www.oro.net');}
> >
> > > Status: 302 Found
> > > Uri: http://www.oro.net
> > > Location: http://www.oro.net
> > > Content-type: text/html
> >
> > What error? That's the expected output!
>
> I am sorry I forgot to tell you that the status message apears in the
> browser window.
http://www.stack.nl/htmlhelp/faq/cgifaq.5.html#4
> I guess I thought that the browser would go to the
> redirected page.
Sounds as if you _had_ already closed off the header part before
sending the redirection headers.
------------------------------
Date: Sun, 18 Jul 1999 11:35:04 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: I can't find this one in the FAQ.
Message-Id: <1dv4yfx.7150wsqb730gN@p29.tc9.metro.ma.tiac.com>
oronet Tech - Joshua Scott <jscott@oro.net> wrote:
> Ronald J Kimball wrote:
> >
> > oronet Tech - Joshua Scott <jscott@oro.net> wrote:
> >
> > > Status: 302 Found
> > > Uri: http://www.oro.net
> > > Location: http://www.oro.net
> > > Content-type: text/html
> >
> > What error? That's the expected output!
> >
>
> I am sorry I forgot to tell you that the status message apears in the
> browser window. I guess I thought that the browser would go to the
> redirected page.
Ah, okay. It's still not an error message, though. :)
You must be outputting $query->header() somewhere earlier in the script.
Print a header() or a redirect(), but not both.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 18 Jul 1999 15:07:17 GMT
From: spamhater@ucesucks.nouce.com (Rich)
Subject: Re: Keeping competitors out
Message-Id: <slrn7p3rbl.dms.spamhater@zippy.aa2ys.ampr.org>
On Sun, 18 Jul 1999 13:41:07 +0100, Chris <chris@netsoc.tcd.ie> wrote:
>At work, I've recently been asked to write a Perl function which will
>prevent our competitors from logging on to one of our web pages
>(which would be done via a CGI script).
>
>Someone suggested checking the IP address of people who log onto the site
>with a list of our competitors' IP addresses, and determining access
>legibility that way.
>
>How would I do this?
>Any ideas as to other ways I could tackle this problem?
Absolutely ridiculous. Sure, you can block your competitors IP
addresses. If you do go that route, then its a network engineering
problem, and not a web application problem.
Of course, this means that you will have to update your block-list
every single day, as new competitors come on board, and they get
new addresses.
You'll have to worry about blocking other legitimate users, when
your competitors use a common firewall with other users at the ISP.
You'll have to worry about them using an ISP that proxies all
HTTP requests for all customers.
You'll have to rely on the competitor being so clueless that
*none* of their employees have personal network accounts that they
can dial up and use.
Are you also going to require that your phones to your sales people
block your competitors numbers? Are you going to perform a background
investigation of all requests for literature, to make sure that they
don't get any documentation that way?
Is it starting to sound really silly yet?
- Rich
------------------------------
Date: 18 Jul 1999 15:25:18 GMT
From: Jonesy <jonz@rmi.nospam.net>
Subject: Re: Keeping competitors out
Message-Id: <7msrku$4f9$1@news1.rmi.net>
Rich <spamhater@ucesucks.nouce.com> wrote:
> On Sun, 18 Jul 1999 13:41:07 +0100, Chris <chris@netsoc.tcd.ie> wrote:
>> At work, I've recently been asked to write a Perl function which will
>> prevent our competitors from logging on to one of our web pages
>> (which would be done via a CGI script).<
<--Big Snip->
> Is it starting to sound really silly yet?
Oh - yes! And not at all perl'ish.
Jonesy
--
Marvin L. Jones jonz<AT>rmi.net
Gunnison, Colorado
166 days to go until the Year 2000 -- So what!
532 days to go until the 3rd Millennium of the C.E.
------------------------------
Date: 18 Jul 1999 16:14:19 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Keeping competitors out
Message-Id: <slrn7p3vf1.bpo.fl_aggie@thepentagon.com>
On Sun, 18 Jul 1999 15:07:17 GMT, Rich <spamhater@ucesucks.nouce.com>, in
<slrn7p3rbl.dms.spamhater@zippy.aa2ys.ampr.org> wrote:
+ Absolutely ridiculous.
[snip]
+ Is it starting to sound really silly yet?
Now, to add a little bit of PHB to this...
Could we have it done tomorrow?
ObDilbertQuote:
PHB: Can you block all friviolus use of the Internet?
Dogbert: Sure. <unplugs entire company from network> I've seen your business
plan.
James
------------------------------
Date: Sun, 18 Jul 1999 14:38:57 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Looking for Online Regex Test Form
Message-Id: <379be6c4.2150592@enews.newsguy.com>
On Thu, 15 Jul 1999 12:42:18 -0800, Ashish Kadakia
<anonymous@web.remarq.com> wrote:
>Hi, I am looking online regex test form. I came across one,
>which is Javascript based it doesn't work.
>If anyone knows, please point me.
Not sure whether this is what you mean, but just create a web page
with a form that posts to a Perl program which then takes the string
you want to test and the regex you want to test with, and prints the
result.
Maybe you could elaborate on your Perl problem?
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 11:37:13 -0400
From: Brian Gilman <gilmanb@vuser.union.edu>
Subject: Re: newbie needs help!
Message-Id: <3791F4A6.84D00039@vuser.union.edu>
Woops!
I meant to use push not shift!!!! But thanks for all the help! I'll look into
implementing this piece of code in my program and see what happens!
have one more question and then I'll stop pestering you........I want to pass
this array to my main routine....I use the return statement in my sub routine like
this:
return @array;
However, when I use this assignement: @another_array=subroutine; I only get
the first element of the array out? What gives? How do I get the whole array
passed......Can I pass it by reference? I know it explodes after leaving the
subroutine like C but I've been trying to use the local keyword and have no
luck.........
I believe I want to do something like: subroutine{
open(CONF, "$conf_file_loc");
@array= chomp(<CONF>);
return \@array; #reference array
}
mainfunc{
foreach $word( @($subroutine){ #is
this right?
@new_array = $word;
}
}
Will this assign every element of the @array to the new_array? Thanks in
advance!
Brian
Abigail wrote:
> Larry Rosler (lr@hpl.hp.com) wrote on MMCXLVII September MCMXCIII in
> <URL:news:MPG.11fb098df215fb42989cf1@nntp.hpl.hp.com>:
> ,,
> ,, Ook. Bloody bareword misprint there. Of course, in line with my
> ,, environmentally-correct goal of conserving the world's limited supply of
> ,,
> ,, semicolons, I would write it thus:
> ,,
> ,, chomp(@array = <CONF>);
>
> You do realize that one hardly needs semicolons in Perl, don't you?
> That one semicolon there isn't necessary:
>
> {chomp(@array = <CONF>)}
>
> Abigail
> --
> perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
> 0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
> =>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
> !$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 18 Jul 1999 13:03:43 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: newbie needs help!
Message-Id: <x7wvvxhouo.fsf@home.sysarch.com>
>>>>> "BG" == Brian Gilman <gilmanb@vuser.union.edu> writes:
BG> I meant to use push not shift!!!! But thanks for all the help!
BG> I'll look into implementing this piece of code in my program and
BG> see what happens!
but even if you had used push, you had the syntax wrong. please study
your books (you do have perl books, learning perl in particular?) and
online docs some more before you attempt to fly solo again.
BG> have one more question and then I'll stop pestering
the pestering is ok if you do your homework.
BG> you........I want to pass this array to my main routine....I use
BG> the return statement in my sub routine like this: return @array;
BG> However, when I use this assignement: @another_array=subroutine; I
BG> only get the first element of the array out? What gives? How do I
BG> get the whole array passed......Can I pass it by reference? I know
BG> it explodes after leaving the subroutine like C but I've been
BG> trying to use the local keyword and have no luck.........
show your actual code where you can't pass an array back via return. it
works for everyone else.
BG> open(CONF, "$conf_file_loc");
ALWAYS check your opens for failure.
BG> @array= chomp(<CONF>);
wrong again. we posted 2 (count'em) 2 ways to do that and you combined
them into a wrong way. chomp does NOT return its chomped values but
rather the number of chomped chars. and it modifies its arguments in
place. reread our previous followups (which you even quoted in the wrong
place below and you didn't copy their code examples!!)
BG> return \@array; #reference array
where is array declared? if it is a my variable in the sub that would
work. but given your propensity for simple bugs, i would stay away from
references until you learn basic perl, like how to return an array from
a sub.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Sun, 18 Jul 1999 12:58:46 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: pure perl solution for Blowfish, DES or IDEA?
Message-Id: <1dv4eyu.13oqjdi1vd57v5N@roxboro0-0021.dyn.interpath.net>
Ethan H. Poole <ehpoole@ingress.com> wrote:
> On the downside, I'd have to find a way to cripple it before I could give
> it to you <sigh>. Like most in the US who work with cryptography from
> time to time, I am not particularly fond of the ITAR restrictions on
> export... it's insane I can't export even an imported technology.
The first time I ran into that I thought I was getting my legged pulled;
you got the code from outside the US right? Now you can't send it back,
right? Come'on, where's the camera!
--
John Moreno
------------------------------
Date: Sun, 18 Jul 1999 05:46:13 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Question for the perl gods
Message-Id: <5p7sm7.go.ln@magna.metronet.com>
John M. Dlugosz (john@dlugosz.com) wrote:
: P.S. I'm I getting the "snotty quotient" correct?
No, you are not getting it right.
: I'm new to this
: newsgroup and still trying to fit in.
You should try and be more courteous.
After several hundred courteous responses, *then* you can
pull out the snottiness.
It is not that folks here are less tolerant than elsewhere, it
is that their patience is tried with much more density than
elsewhere.
Perl's low barrier to entry allows participation by people of
less clue than is customarily found in programming newsgroups.
: I'm used to much more polite and
: gentile conversation.
^^^^^^^
We are not anti-semitic here.
Anyone can post here, regardless of their religion.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 18 Jul 1999 12:55:34 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Regular expression question (Problems with parsing ascii go diagrams)
Message-Id: <x71ze5j3sp.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> You should anchor your expression, and get everything from the beginning
A> upto and including the part you are interested in.
A> /^ # The beginning of the line.
<snip of extended regex>
A> /x;
this is just to point out a very polite, professional, complex and
correct from abigail. you just have to tickle her fancy with the right
perl perfume.
:-)
A> I can't recall a regex about parsing go diagrams in the Camel.... ;)
it is so nice to see perl and go in the same post.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Sun, 18 Jul 1999 14:23:23 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Seeking for a page maintainer for the Cetus Links
Message-Id: <3796e31a.1212743@enews.newsguy.com>
On Sun, 18 Jul 1999 14:23:01 +0200, "Manfred Schneider"
<manfred.schneider@rhein-neckar.de> wrote:
>To enhance and to improve the site we are currently looking for someone
>who would like to take over the page
>
> Perl http://www.cetus-links.org/oo_perl.html
You might be better off at misc.jobs.offered, or
perl-jobs-announce@happyfunball.pm.org (the perl-jobs-announce list on
www.pm.org).
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 14:30:06 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Some more benchmark results:
Message-Id: <3799e4dd.1663622@enews.newsguy.com>
On Sat, 17 Jul 1999 16:41:41 -0700, lr@hpl.hp.com (Larry Rosler)
wrote:
>See my answer to Andrew Perrin. Doing nothing is often faster than
>doing something.
Doing nothing sure takes less resources than doing something.
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 05:56:57 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: String
Message-Id: <9d8sm7.go.ln@magna.metronet.com>
Marc (marc.barieux@t-online.de) wrote:
: I'd like to know how I can extract lines from a string in Perl... I'm new to
: this language and have no ideas how to do that.
foreach my $line ( $string =~ /(.*\n?)/g ) {
print $line;
}
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 18 Jul 1999 14:21:48 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: String
Message-Id: <3795e2bd.1119219@enews.newsguy.com>
On Sun, 18 Jul 1999 14:21:12 +0200, "Marc" <marc.barieux@t-online.de>
wrote:
>Hi,
>I'd like to know how I can extract lines from a string in Perl... I'm new to
>this language and have no ideas how to do that.
There are several ways of doing that.
Try splitting along the end-of-line character. Or use a regular
expression to find the parts of the string you need.
perldoc -f split
perldoc perlre
Marcel
--
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'
------------------------------
Date: Sun, 18 Jul 1999 16:24:35 GMT
From: gibsea@hotmail.com
Subject: When can a CGI execute the CHMOD command
Message-Id: <7msv3s$5en$1@nnrp1.deja.com>
I think I'm having problems getting the chmod command to work.
I have a test.cgi in the CGI-BIN but I'm chmod files in another
directory(test). Does the test<dir> have to be executable in order
for cgi's to use the chmod command on the files within it?
chmod 0706, '$test_dir/$test_file';
open (test, ">>$test_dir/$test_file")
print test "$testthing, $testthing2, $testthing3,";
close (test);
chmod 0704, '$test_dir/$test_file';
I want it so the file becomes writable, and then returns to readonly.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 18 Jul 1999 17:02:57 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: When can a CGI execute the CHMOD command
Message-Id: <37920894.46DD4F8D@home.com>
[posted & mailed]
gibsea@hotmail.com wrote:
>
> I think I'm having problems getting the chmod command to work.
>
> I have a test.cgi in the CGI-BIN but I'm chmod files in another
> directory(test). Does the test<dir> have to be executable in order
> for cgi's to use the chmod command on the files within it?
Yes, but you can get your program to tell you this if you test your
system calls.
> chmod 0706, '$test_dir/$test_file';
chmod 0706, '$test_dir/$test_file'
or die "Can't chmod '$test_dir/$test_file': $!";
> open (test, ">>$test_dir/$test_file")
or die "Can't open '$test_dir/$test_file': #!";
# etc.
--
Rick Delaney
rick.delaney@home.com
------------------------------
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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.
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 182
*************************************