[13759] in Perl-Users-Digest
Perl-Users Digest, Issue: 1169 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Oct 24 20:05:32 1999
Date: Sun, 24 Oct 1999 17:05:10 -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: <940809909-v9-i1169@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 24 Oct 1999 Volume: 9 Number: 1169
Today's topics:
Can cgi pass uid/pwd for access to .htaccess protected <bajan@cool.mb.ca>
Re: Changing attribs of a file on server, how? <nikita@mondenet.com>
Re: Changing attribs of a file on server, how? <dchrist@dnai.com>
changing password in perl (chpasswd) amir142@my-deja.com
Re: changing password in perl (chpasswd) <dchrist@dnai.com>
Complete Perl-based website and domains for sale. <starchuk@my-deja.com>
Re: file sorting <lr@hpl.hp.com>
Re: HOWTO convert year/week date 1999/43 to 24.10.1999? <sb@sdm.de>
Re: invalid transmission? <gellyfish@gellyfish.com>
Re: invalid transmission? <dchrist@dnai.com>
Re: Learn to do deja searches was [Re: Perl vs. REBOL] <gellyfish@gellyfish.com>
Re: Learn to do deja searches was [Re: Perl vs. REBOL] <bz9t@yahoo.com>
Re: linux perl editor? <carville@cpl.net>
Re: Long menus -- any solutions? <stacy.doss@amd.com>
Re: Need help With Date and Time Stamps on a File <sb@sdm.de>
Newbie: Calling a Perl script from an HTML page without <pete@m-techcom.demon.co.uk>
Re: not enough swap space <gellyfish@gellyfish.com>
Re: not enough swap space <eugene@snailgem.org>
Re: Perl lite (Chris Fedde)
Re: Perl Message Board problem <ebow2000NOebSPAM@aol.com.invalid>
Re: Perl Message Board problem <gellyfish@gellyfish.com>
Re: Perl Message Board problem <dchrist@dnai.com>
Re: Perl vs. REBOL (Martien Verbruggen)
Re: PerlScript for ASP installation problem petrovitch@my-deja.com
permisson problem on WRITE -- strange edward_grossman@my-deja.com
Re: permisson problem on WRITE -- strange <dchrist@dnai.com>
Q: Instructions for embedding Perl in Borland Delphi <wbell@interlynx.net>
Re: Redundant POD (was Re: Underlying data structure be <gellyfish@gellyfish.com>
Re: Reference challenge (Sean McAfee)
Re: Reference challenge <lr@hpl.hp.com>
Re: Substitution <lr@hpl.hp.com>
Why does this code give a broken pipe? <gavin@optus.net.au.killspam4ever>
Re: write binary? <gellyfish@gellyfish.com>
Re: write binary? <dchrist@dnai.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 24 Oct 1999 23:05:14 GMT
From: Robert Bajan <bajan@cool.mb.ca>
Subject: Can cgi pass uid/pwd for access to .htaccess protected files?
Message-Id: <38138F52.278C2E2A@cool.mb.ca>
Can cgi pass uid/pwd (collected from html form or cookie) to acl
(.htaccess) for access of protected pages?
I would like to provide option of saving uid/pwd in a cookie so that
visitors don't need to login every time they visit the site.
Thanks!
Rob
------------------------------
Date: Sun, 24 Oct 1999 23:29:14 GMT
From: Nikita Synytskyy <nikita@mondenet.com>
Subject: Re: Changing attribs of a file on server, how?
Message-Id: <38139654.1CBBB0A@mondenet.com>
Marcel Grunauer wrote:
{snip}
>
> - Don't post to this newsgroup
> - Don't install Perl
> - Don't read books about Perl
> - Don't look at Perl code
>
Thank you for your informative in-depth answers.
Nikita.
------------------------------
Date: Sun, 24 Oct 1999 16:00:48 -0700
From: "David Christensen" <dchrist@dnai.com>
Subject: Re: Changing attribs of a file on server, how?
Message-Id: <7v05ft$5l4$1@pollux.dnai.com>
Nikita:
> The questions in this post deal more with general CGI programming
issues
> ...
> to CGI-related newsgroups, but most of them have such low traffic
that
Try putting your question on:
comp.infosystems.www.authoring.cgi
It has lots of traffic.
--
David Christensen
dchrist@dnai.com
------------------------------
Date: Sun, 24 Oct 1999 22:31:57 GMT
From: amir142@my-deja.com
Subject: changing password in perl (chpasswd)
Message-Id: <7v01cu$vkh$1@nnrp1.deja.com>
I am running Redhat Linux 6, perl5.
I am trying to create user accounts with perl over the web.
I have one problem. I am trying to use chpasswd to create the password.
Because chpasswd requires data from STDIN, example:
$ /usr/sbin/chpasswd
(just a blinking cursor, you have to type username:newpassword, so:)
amirm:mypassword
(then you have to press ^D to exit the program).
So, in Perl, I want to use the < to redirect the input, here is my line
in perl:
$command = `/usr/sbin/chpasswd < /bin/echo -e amirm:mypassword\\^D`;
After tyipng or putting amirm:mypassword,
chpasswd requires an Return to be pressed, and the a Control-D to be
pressed.
How can I accomplish this with perl?
Much thanks,
Amir
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sun, 24 Oct 1999 16:54:09 -0700
From: "David Christensen" <dchrist@dnai.com>
Subject: Re: changing password in perl (chpasswd)
Message-Id: <7v06a9$5n2$2@pollux.dnai.com>
Amir:
> I am trying to create user accounts with perl over the web.
Try putting your question on:
comp.infosystems.www.authoring.cgi
It's a better forum for Perl and CGI.
--
David Christensen
dchrist@dnai.com
------------------------------
Date: Sun, 24 Oct 1999 22:49:55 GMT
From: "Ernie Starchuk" <starchuk@my-deja.com>
Subject: Complete Perl-based website and domains for sale.
Message-Id: <n2MQ3.17935$%o1.145677@news1.rdc1.bc.home.com>
Offering a mostly-developed free diskspace website for auction. Site needs a
good, motivated Perl programmer to finish and launch website. More
information at:
http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=185688383
auction ends on Tuesday morning.
------------------------------
Date: Sun, 24 Oct 1999 16:11:26 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: file sorting
Message-Id: <MPG.127d31f5c18c049c98a110@nntp.hpl.hp.com>
In article <7uuphp$g11$1@gellyfish.btinternet.com> on 24 Oct 1999
11:11:53 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On Sat, 23 Oct 1999 08:51:31 -0700 Larry Rosler wrote:
> > But now that the Schwartz has appeared,
>
> After I read that I got this picture in my mind :
>
> 'Release the Schwartz' [cue music]
>
> Randal in chains and leather is dragged out of a large trunk ...
>
> I guess we could call it Perl Fiction ;-}
No -- I had Perl space fiction in mind.
The Schwartz be with you!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 24 Oct 1999 22:07:42 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: HOWTO convert year/week date 1999/43 to 24.10.1999???
Message-Id: <7uvvve$h4f$1@solti3.sdm.de>
In comp.lang.perl.misc Thomas Frei <thomas.frei@erp-solutions.de> wrote:
> I`ve got strings holding "1999/43" or "1999/44".
> Does anybody now how I can convert that string to the date of the first
> monday of that week?
> Thanks
> Thomas
use Date::Calc qw(:all);
($year,$month,$day) = Monday_of_Week($week,$year);
See http://www.perl.com/CPAN/modules/by-module/Date/
to download this module (Date-Calc-4.2.tar.gz).
Regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: 24 Oct 1999 22:31:55 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: invalid transmission?
Message-Id: <7v01cr$gp4$1@gellyfish.btinternet.com>
On Sun, 24 Oct 1999 14:41:40 -0500 Steve wrote:
> why do people have to be so damn rude...all it is is a question that has not
> been answered by the host server.
You are asking a question about some application software in a newsgroup
that is concerned with a programming language. Would you ask a question
about Microsoft Word in comp.lang.c ?
> If you are the expert on this subject then
> you should know if it is a perl question and not just reply that it doesn't
> "sound" like one.
OK I will be more precise about this - it is not a Perl question - it is
a question about some program that might happen to be written in the language,
although I have no reason to know whether it is or not. The error message
that you quote is not a Perl message but is one that is generated by the
program.
> Newsgroups are supposed to be helpful to people not for
> people to be ridiculed! It is a legitimate question and all I would like to
> know is if anyone has ever run into this problem before.
But you have come to the wrong place to ask the question.
> I did not expect to
> be ridiculed for asking a question!
You were not ridiculed - it was just questioned why thought this was the
appropriate place to ask this question. Again would you ask a question
about Microsoft Word in comp.lang.c ?
> There are several "programmers" out
> there who use this script and I thought some of them might be courteous
> enough to tell me if they have ever ran into this error.
Why do you put the word 'programmers' in quotes like that ? Anyone who *I*
would counsider to be intelligent enough to be a programmer would also be
intelligent enough to post a question in the appropriate place.
> I will venture to
> guess that you are just some errogant asshole who likes to make people think
> he is an expert!
Oh how delightful. I really do hope that you wont be expecting any further
help from this group as you just blew it right there.
> I really hope there is a respectful web master out there
> who might be able to at least point me in the right direction to correct
> this problem.
Of course if you had actually bothered to research this before you made
this ignorant post then you might have found several answers that have
already been given in this group - you should search for your very
subject line at Deja news <http://www.deja.com> - You really dont think
that you are the first person to have asked this here do you ?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 24 Oct 1999 15:32:54 -0700
From: "David Christensen" <dchrist@dnai.com>
Subject: Re: invalid transmission?
Message-Id: <7v01hu$5b7$1@pollux.dnai.com>
Steve:
Try putting your question on:
comp.infosystems.www.authoring.cgi
--
David Christensen
dchrist@dnai.com
------------------------------
Date: 24 Oct 1999 22:10:40 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Learn to do deja searches was [Re: Perl vs. REBOL]
Message-Id: <7v0050$got$1@gellyfish.btinternet.com>
On Sun, 24 Oct 1999 17:05:41 -0400 James Tsai wrote:
> . It would have been much simpler if someone had
> just replied "sorry, we don't address questions like that here."
>
I think that is what Martien said in the first place.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 24 Oct 1999 18:32:48 -0400
From: "Billy Zhao" <bz9t@yahoo.com>
Subject: Re: Learn to do deja searches was [Re: Perl vs. REBOL]
Message-Id: <7v01f4$nhn$1@murdoch.acc.Virginia.EDU>
What he said was close, but with a lot of unnecessary condescension.
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:7v0050$got$1@gellyfish.btinternet.com...
> On Sun, 24 Oct 1999 17:05:41 -0400 James Tsai wrote:
> > . It would have been much simpler if someone
had
> > just replied "sorry, we don't address questions like that here."
> >
>
> I think that is what Martien said in the first place.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 24 Oct 1999 22:06:36 +0000
From: Stephen Carville <carville@cpl.net>
Subject: Re: linux perl editor?
Message-Id: <381382EC.904D2058@cpl.net>
Dan Sugalski wrote:
>
> Abigail <abigail@delanet.com> wrote:
> > Elaine -HFB- Ashton (elaine@chaos.wustl.edu) wrote on MMCCXLI September
> > MCMXCIII in <URL:news:380DDDB5.647B3D86@chaos.wustl.edu>:
> > `` Kent Perrier wrote:
> > `` > I like echo.
> > ``
> > `` Real men use ed :)
>
> > Pfff. ed is for wussies. Real (wo)men toggle front panels.
>
> Hah! Wimp. Real Programmers use a nail and 9-volt battery to set the
> magnetic fields on the cores in the memory chassis.
No REAL programmers use an STM and construct the logic on a silicon
chip...
--
Stephen Carville
carville@cpl.net
----------------------------------------------------
There are two kinds of people: those who do the work and those
who take the credit. Try to be in the first group; there is less
competition there.
Indira Gandhi
------------------------------
Date: Sun, 24 Oct 1999 17:25:29 -0500
From: Stacy Doss <stacy.doss@amd.com>
Subject: Re: Long menus -- any solutions?
Message-Id: <38138759.BB8A9216@amd.com>
Stephen O. Lidie wrote:
>
> In comp.lang.perl.tk Makarand Kulkarni <makkulka@cisco.com> wrote:
> > Stacy Doss wrote:
>
> >> Is there any way to have a menu widget display in multiple columns?
>
> > assuming that you are talking about menu widgets in the inside
> > HTML forms
>
> In a Tk group?
>
> Anyway, use a menu item's -columnbreak option ...
Yes your right it was the Tk Menu widget I was asking about.
-columnbreak worked great. I did have to upgrade to 5.00502 from
5.00404. When exactly was this option introduced?
--
_______ : Stacy Doss
\____ | Advanced : Product Development Engineering
/| | | Micro : Stacy.Doss@amd.com
| |___| | Devices : Voice: (512) 602-2324
|____/ \| : FAX: (512) 602-6970
: Wats Line: 1-800-538-8450 x52324
------------------------------
Date: 24 Oct 1999 22:09:41 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: Need help With Date and Time Stamps on a File
Message-Id: <7v0035$h4f$2@solti3.sdm.de>
In article <mbudash-2410991109360001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>, Michael Budash <mbudash@sonic.net> wrote:
> In article <bPHQ3.11700$Ua7.317278@news2.rdc1.on.home.com>, "B.J.G."
> <Ghassemlou@home.com> wrote:
> >I am trying to get the time/date of last update on certain files on the
> >server
> >is there any perl command that supports that
> >Thanks
> >bGhassemlou@yahoo.com
> see perl's stat function
See also the -M operator (man perlfunc).
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: Sun, 24 Oct 1999 23:21:28 +0100
From: "Pete" <pete@m-techcom.demon.co.uk>
Subject: Newbie: Calling a Perl script from an HTML page without user action
Message-Id: <940803565.19567.0.nnrp-13.c2de5fac@news.demon.co.uk>
How can I arrange for a perl script to be called from within an HTML page
without the user having to click on a link? I can do it by embedding my Perl
script in an image statement like <img src="/cgi-bin/something.pl"> but I
don't know what dummy data to make it return to prevent the browser showing
a red cross to indicate the image wasn't found.
------------------------------
Date: 24 Oct 1999 22:12:59 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: not enough swap space
Message-Id: <7v009b$gp0$1@gellyfish.btinternet.com>
On Sun, 24 Oct 1999 17:47:18 +0200 Yael Sofer wrote:
> When running a script I've written which is supposed to run apps I get
> the message "unable to obtain requested swap space". The script runs
> on, obtaining unwanted results. Is there a way to get more swap space
> or to divide the swap space somehow (I don't have SU privileges in the
> specific computer).
>
You will need to ask this question in a newsgroup that is appropriate
for the Operating System you are using I'm afraid.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 24 Oct 1999 18:28:59 -0400
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: not enough swap space
Message-Id: <3813882B.657330D8@snailgem.org>
Yael Sofer wrote:
>
> When running a script I've written which is supposed to run apps I get
> the message "unable to obtain requested swap space". The script runs
> on, obtaining unwanted results. Is there a way to get more swap space
> or to divide the swap space somehow (I don't have SU privileges in the
> specific computer).
> thank you,
>
> Yael.
1. If you don't have administrator privileges, you won't be able to do
anything about swap space.
2. Is your script by chance gobbling up a lot of memory? maybe there's a
way to fix it so it won't require memory swapping.
3. This is only a Perl question in case 2. above is true. 1. is a
question for your system admin.
--
Eugene
------------------------------
Date: Mon, 25 Oct 1999 00:02:52 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Perl lite
Message-Id: <M6NQ3.13$F3.187871744@news.frii.net>
In article <x7d7ulkv0a.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "A" == Abigail <abigail@delanet.com> writes:
> A> John Kristian (kristian@netscape.com) wrote on MMCCXXXII September
> A> MCMXCIII in <URL:news:38022B7C.2B2C790F@netscape.com>:
> A> ^^ How can I make Perl occupy less disk space?
> A> nowadays. I'm sure you have other junk you can delete. ;-)
>
>actually i found a place where i needed to do this. my new web/mail host
>has a low price deal with only 5MB for $9.95/Month (with virtual
>hosting). but they have a crappy old perl (5.004_01 would you believe!)
>and no decent modules. so i installed the latest and my needed modules
>into my home dir and everything is dandy. but they now take up 6.5MB so
>i have to pay an additional $2.95/MB/month. the next level is $24.95 for
>50MB so i am saving a whole $9.10/month. i deleted all the docs, extra
>stuff, source, etc. all i left was the binary and the modules in
>lib. they actually take up the bulk of the space and if i stripped them
>of pod it would go down a great deal i think. i know this is crazy just
>for the few bucks, but there is a principle here!
>
>uri
>
Back in the early part of this year Tom posted a command line class
browser that I have found quite valuable. These are the pmtools
bundle. As I remember there was some argument about the impact of
using these tools since they work by invocation rather than
inspection. For whatever reason I have not been able to find them
in any of the common archives.
Still the plxload(1) utility from that set will return a list of
all the modules that the argument loads at compile time. This data
could be used to create a perl "runtime" that only contained the
modules that wre explicitly needed by the program. In Uri's case
this might be just what is asked for.
In the original posting the path was somewhere on mox.perl.com
but that seems to be dead now. If any one is interested my copy of the
original tar.gz, it is available at.
http://denver.pm.org/pmtools-1.00.tar.gz
chris
------------------------------
Date: Sun, 24 Oct 1999 14:57:17 -0700
From: Iain <ebow2000NOebSPAM@aol.com.invalid>
Subject: Re: Perl Message Board problem
Message-Id: <0a0133f8.59e789bc@usw-ex0101-004.remarq.com>
Forgive my apparently amazing 'encoding' ;o)
The password area gets the username and passowrd (surprisingly). This
then needs to lead to a message board system, of some kind but
hopefully a version of the WWWBoard script from Matt Wright, with the
username's email address already in place in the 'send message' parts
of the message board. How can I use perl in my .cgi script to get the
user data to the message board?
Er... which is EXACTLY what my original post said - in my tired mind.
Got shortened a bit by the time it got to the keyboard... ;o)
Semi-urgent regards.
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: 24 Oct 1999 22:07:31 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Message Board problem
Message-Id: <7uvvv3$goq$1@gellyfish.btinternet.com>
On Sun, 24 Oct 1999 13:28:49 -0700 Iain wrote:
> In article <Pine.HPP.3.95a.991024204427.3949K-100000@hpplus01.cern.ch>,
> "Alan J. Flavell" <flavell@mail.cern.ch> wrote:
>
>> Now, what was your Perl language question?
>
> Thanks for the faq tip. The Perl language question is in my original
> post. Look closely.
>
Well I looked very closely and for the life of me I cant see any
Perl question there at all. I certainly didnt see any code just an
allusion to some widely criticised script.
> cheerz.
>
> Iain
>
> Sarcasm and newsgroup postings by regulars - tedious bedfellows...
>
Oh so you either want to troll here or you dont care whether you get
an answer either way you've blown it already.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 24 Oct 1999 15:30:18 -0700
From: "David Christensen" <dchrist@dnai.com>
Subject: Re: Perl Message Board problem
Message-Id: <7v01df$5b3$1@pollux.dnai.com>
Iain:
Try putting your question on:
comp.infosystems.www.authoring.cgi
--
David Christensen
dchrist@dnai.com
------------------------------
Date: Sun, 24 Oct 1999 23:16:48 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl vs. REBOL
Message-Id: <ArMQ3.85$6r2.2403@nsw.nnrp.telstra.net>
On Sun, 24 Oct 1999 13:23:12 -0400, Billy Zhao <bz9t@yahoo.com> wrote:
> Martien,
>
> Again, if you actually read what I said, I did not ask for "you" to
> do my work
You still post in Jeopardy style.
You CCed me without saying so in the body of your post
And you sent me two other personal emails that you didn't post, in
reply to all this, which weren't particularly civilised. And they
had nothing to do with what went on here, unless you believe my
haircut or my sex life is in any way relevant to this.
This is really getting a bit sad. You want us to do your work for you,
and I maintain that that is exactly what you asked, and you get
terribly upset if that gets pointed out to you. No, you did not ask me
personally, but you did ask the group here.
*plonk*
Martien
--
Martien Verbruggen |
Interactive Media Division |
Commercial Dynamics Pty. Ltd. | Curiouser and curiouser, said Alice.
NSW, Australia |
------------------------------
Date: Sun, 24 Oct 1999 23:18:36 GMT
From: petrovitch@my-deja.com
Subject: Re: PerlScript for ASP installation problem
Message-Id: <7v044b$1gt$1@nnrp1.deja.com>
Most of the PerlScript functions work fine, but I haven't been able to
make the read/write file functions work. Is there a users manual,
books, or list of working examples from which to choose?
It's easy to do "Hello World". I'm talking about some real scripts.
Is it possible to use PerlScript (embedded within HTML) to receive
information from a web page, parse it, process it, and generate HTML
code in response? Generating HTML is the easy part. I'm looking for
an easy way to take requests from a client.
As I understand it, PerlScript give me the power of JavaScript plus the
ability to read/write on my system allowing me to create service side
code?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sun, 24 Oct 1999 22:14:07 GMT
From: edward_grossman@my-deja.com
Subject: permisson problem on WRITE -- strange
Message-Id: <7v00be$usv$1@nnrp1.deja.com>
I'm wondering if anyone can help me ...
I've written a CGI in Perl that allows users to create a photo album on
a Web site. The basics:
- specify a directory
- optionally upload photos (they may already some be there as well)
- scan directory, grab photos
- configure output options (e.g. captions)
- burn HTML files to output directory
As soon as you specify your directory, the script verifies that it
exists, and that you have write access to it (no authentication in my
script -- I assume admins will have their own already in place -- and
with out auth, I figured the script would just give you the normal Web
user ("other) status).
This works fine on my Linux test env (RH5.2,Apache1.3.3,Perl5.004), and
as a bland Web user, I am always rejected by the program unlies I go
"chmod 777 some_dir" first.
However, on my ISPs server, the script ALWAYS allows me to write -- and
even though the script is being run by the Web user, it seems to run AS
the owner -- me, and since I have "write" perms everywhere on the site,
it can do a lot of damage.
I tried chmod'ing a random dir to 770 -- the program still wrote to it
(though I could not get to that dir from my browser, but the program
could!).
I changed a random dir to 077 and boom, it failed.
So, any tips out there for me? How is this program running as the owner
when it's accessed anonomously through a browser??
Thanks so much ... ;)
Edward
--
Edward Grossman
dump NOSPAM to reply
edward_grossman@NOSPAMyahoo.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sun, 24 Oct 1999 16:53:18 -0700
From: "David Christensen" <dchrist@dnai.com>
Subject: Re: permisson problem on WRITE -- strange
Message-Id: <7v06a6$5n2$1@pollux.dnai.com>
Edward:
> I've written a CGI in Perl that allows users to create a photo
album on
> a Web site. The basics:
Try putting your question on:
comp.infosystems.www.authoring.cgi
It's a better forum for Perl and CGI.
--
David Christensen
dchrist@dnai.com
------------------------------
Date: Sun, 24 Oct 1999 19:01:38 -0400
From: "Bill Bell" <wbell@interlynx.net>
Subject: Q: Instructions for embedding Perl in Borland Delphi
Message-Id: <7v03ge$18p$1@wolf.interlynx.net>
Has anyone seen detailed information about doing this?
As a newbie to Perl, I'm wondering if PerlEZ might be of particular use in
this context.
Thanks for any advice.
Bill Bell
------------------------------
Date: 24 Oct 1999 21:50:18 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Redundant POD (was Re: Underlying data structure behind blessed reference.)
Message-Id: <7uvuuq$gkc$1@gellyfish.btinternet.com>
On 24 Oct 1999 10:01:30 -0500 Abigail wrote:
>
> You're worse than HTML posters; they at least tend to be honest, and
> put a text/html in their header.
>
Well their browsers tend to make them honest anyway even if they couldnt
give a shit ....
/j\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 24 Oct 1999 22:26:43 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Reference challenge
Message-Id: <DILQ3.625$4G.115867@news.itd.umich.edu>
In article <slrn8160qr.fji.abigail@alexandra.delanet.com>,
Abigail <abigail@delanet.com> wrote:
>Sean McAfee (mcafee@waits.facilities.med.umich.edu) wrote on MMCCXLIV
>September MCMXCIII in <URL:news:ubpQ3.516$4G.101917@news.itd.umich.edu>:
>?? perlfunc guarantees only that ref() returns FALSE if its argument is not a
>?? reference. Sure, ref() returns "" *now* if passed a non-reference, but
>?? suppose a future version of Perl returned 0 instead? Your code would
>?? break.
>Oh, comeon. Be realistic. You've never encountered the p5p compability
>police. It's more likely to win the state lotto twice in a row, without
>buying a ticket, than that something in Perl changes behaviour. ;-)
All well and good, but IMHO the compatibility police count as an
"undocumented implementation detail" for the purposes of the challenge.
If this behavior of ref() is really fixed in stone, why does perlfunc
only describe its return code as FALSE, which encompasses four (or three,
depending on how they're counted) distinct scalar values? This is as silly
as documenting a function which returns a boolean value of 0 or 1 with the
words "returns an odd integer on success, and an even integer on failure".
Time for perlfunc to be updated, maybe?
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: Sun, 24 Oct 1999 16:01:41 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Reference challenge
Message-Id: <MPG.127d2fb2ace453098a10f@nntp.hpl.hp.com>
In article <slrn8160qr.fji.abigail@alexandra.delanet.com> on 24 Oct 1999
08:02:43 -0500, Abigail <abigail@delanet.com> says...
> Sean McAfee (mcafee@waits.facilities.med.umich.edu) wrote on MMCCXLIV
> September MCMXCIII in <URL:news:ubpQ3.516$4G.101917@news.itd.umich.edu>:
> ??
> ?? perlfunc guarantees only that ref() returns FALSE if its argument is not a
> ?? reference. Sure, ref() returns "" *now* if passed a non-reference, but
> ?? suppose a future version of Perl returned 0 instead? Your code would
> ?? break.
>
>
> Oh, comeon. Be realistic. You've never encountered the p5p compability
> police. It's more likely to win the state lotto twice in a row, without
> buying a ticket, than that something in Perl changes behaviour. ;-)
Agreed. And that being the case, I WISH that some useful behavior that
will never change would be documented. One example is the *fact* that
the value of a Boolean expression in arithmetic context is 1 or 0 (as in
C). Yet every time I suggest this, I am told that 'it might change 1n
the future'.
# How many of Booleans f() and g() are true?
$x = (f() ? 1 : 0) + (g() ? 1 : 0);
Yecch!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 24 Oct 1999 15:13:12 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Substitution
Message-Id: <MPG.127d244ccb05cd6298a10e@nntp.hpl.hp.com>
In article <slrn8163m6.fji.abigail@alexandra.delanet.com> on 24 Oct 1999
08:51:25 -0500, Abigail <abigail@delanet.com> says...
> Larry Rosler (lr@hpl.hp.com) wrote on MMCCXLI September MCMXCIII in
> <URL:news:MPG.1277ee5e71f1fbab98a0d7@nntp.hpl.hp.com>:
> ``
> `` But the whole problem is being overkilled. How about this:
> ``
> `` #!/usr/bin/perl -w
> `` use strict;
> ``
> `` print "Content-Type: text/plain\n\n";
> `` open PLAN, '/home/ollie/.plan' or
> `` die "could not open plan file $!\n";
> `` print <PLAN>;
> `` close PLAN or die "could not close plan file $!\n";
>
> Overkill!
>
> perl -pe's!^!Content-Type: text/plain\n\n!if$.<2' /home/ollie/.plan
Underkill!
Please explain exactly how an HTTP server would go about invoking and
executing that command line -- else why bother with the Content-Type
header at all?
Perhaps (if perl is in the server account's PATH):
#!/bin/sh
perl -pe's!^!Content-Type: text/plain\n\n!if$.<2' /home/ollie/.plan
Yuk.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 24 Oct 1999 23:17:48 GMT
From: "Gavin Cato" <gavin@optus.net.au.killspam4ever>
Subject: Why does this code give a broken pipe?
Message-Id: <wsMQ3.81$xw3.1503253@news0.optus.net.au>
Hi all,
This is a very small whois proxy server I wrote.
However after every 10-20 requests it aborts with "broken pipe". Can anyone
see what I'm doing wrong?
thanks
----------------------------------------------------------------------------
---------------------------------------
#!/usr/local/bin/perl -w
use IO::Socket;
$whoishost = "whois.radb.net";
$whoisport = "43";
$logfile = "/home1/gavin/radb_proxy/requests.log";
$port = 27688;
$server = IO::Socket::INET->new( Proto => 'tcp',
LocalPort => $port,
Listen => SOMAXCONN,
Reuse => 1);
while ($client = $server->accept()) {
$command = <$client>;
chomp ($command);
chomp ($date = `date`);
open(LOGFILE, ">>$logfile") or warn "Couldn't append to logfile : $! \n";
print LOGFILE "$date : Command Recieved : $command\n";
close LOGFILE;
$socket = IO::Socket::INET->new(PeerAddr => $whoishost,
PeerPort => $whoisport,
Proto => "tcp",
Type => SOCK_STREAM)
or die "Couldn't open a connection to
$whoishost port $port : $! \n";
print $socket "$command\n";
while (<$socket>) {
print $client "$_";
}
close $socket;
close $client; # end the session, wait for another one
}
------------------------------
Date: 24 Oct 1999 22:36:14 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: write binary?
Message-Id: <7v01ku$gpc$1@gellyfish.btinternet.com>
On Sun, 24 Oct 1999 22:59:07 +0200 Alan J. Flavell wrote:
> Well, I think I can confidently say that setting
> binmode() when it's relevant, is harmless on _any_ system where Perl
> runs. So wouldn't it be safer to just do the right thing, even in the
> situations where it actually has no effect?
>
Oh my gawd - Alan has been posessed by the spirit of Larry Rosler ... ;-}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 24 Oct 1999 15:28:44 -0700
From: "David Christensen" <dchrist@dnai.com>
Subject: Re: write binary?
Message-Id: <7v019u$5av$1@pollux.dnai.com>
Bob:
> I am writing a perl script that will take data from an html form
and
> write that info into an html file on my server, along with some
html
Try putting your question on:
comp.infosystems.www.authoring.cgi
--
David Christensen
dchrist@dnai.com
------------------------------
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 1169
**************************************