[10939] in Perl-Users-Digest
Perl-Users Digest, Issue: 4540 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 4 00:07:25 1999
Date: Sun, 3 Jan 99 21:00:18 -0800
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, 3 Jan 1999 Volume: 8 Number: 4540
Today's topics:
Re: binary conversion <uri@home.sysarch.com>
Re: Editor <off-duty@entheosengineering.com>
Re: failed tests for perl5.005_02 (Stephen Clouse)
Re: How to get start ? (Ronald J Kimball)
Re: Is interpolation/parsing in s/// possible? <gellyfish@btinternet.com>
Re: Is interpolation/parsing in s/// possible? <dgris@moiraine.dimensional.com>
Re: Is Perl as multifunctional as I've heard\read? <metcher@spider.herston.uq.edu.au>
List Boxes in Perl (Arthur Merar)
Re: noop (TheLaser)
Re: Official Perl Movie beable@my-dejanews.com
Re: Official Perl Movie couggg@gocougs.wsu.edu
Re: Path under windows (Ethan H. Poole)
Perl 5.005.02 installation problem (Norman Branitsky)
Re: perl for winnt <philweber@delphi.com>
Re: reading a single char (Ronald J Kimball)
Re: Retrospective on comp.lang.perl.moderated? (Ronald J Kimball)
Re: Retrospective on comp.lang.perl.moderated? (Ronald J Kimball)
Re: Rookie CGI problem <gellyfish@btinternet.com>
Re: Rookie CGI problem <eugene@verticalnet.com>
Re: Security & Permissions: Why can't Perl read files f (Tad McClellan)
Re: Security & Permissions: Why can't Perl read files f <eugene@verticalnet.com>
Sorting a hash <bgcurtis@surfree.com>
Re: Sorting a hash <rra@stanford.edu>
strange behavior of $~ <blazer@mail.nevalink.ru>
Re: strange behavior of $~ <blazer@mail.nevalink.ru>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 03 Jan 1999 19:29:45 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: binary conversion
Message-Id: <x7iuenev7q.fsf@home.sysarch.com>
>>>>> "TM" == Tad McClellan <tadmc@metronet.com> writes:
TM> todda (thirdwaver@inxpress.net) wrote:
TM> : I would like to create a decimal to binary converter is there a
TM> built in : function of some sort to do this?
TM> I don't know of any builtin, but this is Perl, so most things
TM> are easily done in a few lines of code ;-)
TM> (though I expect another followup will do it in much less...)
you betcha!
see pack/unpack and the B or b templates.
remember, perl IS the swiss army chainsaw of languages.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 03 Jan 1999 18:21:02 -0600
From: Rich Grise <off-duty@entheosengineering.com>
To: bob@constructiongigs.com
Subject: Re: Editor
Message-Id: <3690096E.57A23CE3@entheosengineering.com>
Bob Nugent wrote:
>
> Would somebody suggest a proper language/script editor
> for Win95? I was trying to get a bbs working when my
> sysad said that all the perl files have 2 returns " ^M "
> after #!/usr/bin/perl. All I have is Wordpad, Notepad
> and Fusion. None of which show those characters. I need
> to edit a bunch of files before sending to the server.
>
> If so, TIA.
> Bob
Use Wordpad, or Notepad, or whatever you want - then
when you upload the script, set your FTP client for
"ascii" mode - this will strip off the "\r" char's.
(that's perlspeak for ^M, or return.)
--
Rich Grise
off-duty@entheosengineering.com
(No need to futz with my e-mail: I have a "delete" button!)
------------------------------
Date: Mon, 04 Jan 1999 00:21:38 GMT
From: see.sig@for.address (Stephen Clouse)
Subject: Re: failed tests for perl5.005_02
Message-Id: <3690088b.186286136@news.kc.net>
On Sun, 03 Jan 1999 18:40:21 GMT in message <<368fb56c.115874517@news.ping.be>
comp.lang.perl.misc>, Bart.Haezeleer@nospam.pobox.com wrote:
>I'm a newbie on upgrades perl, but for some programs I need perl 5.005
>or higher.
>I found a TAR.GZ ball with version 5.005_02
>
>Some of the test fails and I can't figure out why ?
>The compilation when very well. Other scripts work very well.
>My configuration : Slackware 2.0.35 + glibc2
That is most likely your problem. The last distro of Slackware I used shipped
with a completely broken glibc. (As a former Slackware user, I know. It caused
me no end of problems.) Either compile glibc yourself from source or get a real
Linux distro such as Debian or Redhat that ships with a working glibc.
(Slackware did die several years ago, in case you weren't notified.)
--
Stephen Clouse -- steve at acme-labs dot com (Anti-Spam enabled)
Acme Labs -- Resident Megalomaniac (http://www.acme-labs.com)
------------------------------
Date: Sun, 3 Jan 1999 23:20:21 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: How to get start ?
Message-Id: <1dl2tav.u2xw5tw5qkw0N@bay2-410.quincy.ziplink.net>
[posted and mailed]
Free Stuff <ex5316@netvigator.com> wrote:
>
Hmm... From the 'real' name and the domain, I have a bad feeling that I
am helping a filthy spammer. :-(
> I use window 95. What software do I need to install in my computer so
> that I can test and run the Perl scripts in my computer before I put the
> scripts to the Server.
> I already go to http://www.perl.com but I don't know which software
> should I download.
>From <http://www.perl.com>, find the link to download the latest version
of Perl. On that page, you will find a section on Win32, with a link to
<http://www.activestate.com/activeperl>, where you can download a
precompiled binary of Perl for Win32 systems.
Enjoy!
[But don't use Perl to send unsolicited commercial email, or I'll come
back and kick your ass.]
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 4 Jan 1999 00:23:16 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Is interpolation/parsing in s/// possible?
Message-Id: <76p1lk$1a3$1@gellyfish.btinternet.com>
On 3 Jan 1999 22:29:49 GMT Tom Christiansen wrote:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc, Jonathan Stowe <gellyfish@btinternet.com> writes:
> :Using the eval() with the /e modifier seems (to me anyhow)
> :to be the only way of doing this.
>
> Using /ee seems more straightforward. But this is a strange
> bunch of requirements, methinks.
>
That /ee thing had gone straight in one eye and out the other I'm afraid.
Logically I assume that it is the only one of these modifiers that behaves
this way - but I cant actually remember seeing it documented only referred
to here (in retrospect and copious grepping of my news spool).
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 03 Jan 1999 18:29:30 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Is interpolation/parsing in s/// possible?
Message-Id: <m3n23zesg5.fsf@moiraine.dimensional.com>
Jonathan Stowe <gellyfish@btinternet.com> writes:
> That /ee thing had gone straight in one eye and out the other I'm afraid.
>
> Logically I assume that it is the only one of these modifiers that behaves
> this way - but I cant actually remember seeing it documented only referred
> to here (in retrospect and copious grepping of my news spool).
It's documented, but I can see how it would be easy to miss. From
perlop's entry on s///-
# /e's can even nest; this will expand
# any embedded scalar variable (including lexicals) in $_
s/(\$\w+)/$1/eeg;
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Mon, 04 Jan 1999 14:45:39 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Is Perl as multifunctional as I've heard\read?
Message-Id: <36904773.F2598FD4@spider.herston.uq.edu.au>
Uri Guttman wrote:
<snip>
> and when looping over a list, i like foreach rather than for. i reserve
> for for for loops as in c. (3 fors in a row, wanna try for four?)
>
I agree. Don't use foreach for for. Use for for for forever!
--
Jaime Metcher
------------------------------
Date: Mon, 04 Jan 1999 00:55:26 GMT
From: amerar@unsu.com (Arthur Merar)
Subject: List Boxes in Perl
Message-Id: <3690116e.64423191@news.chaven.com>
Hello,
I have two questions.
If I have an HTML form that has a multiple selection list box, what
type of code do I need to get all my selections? Currently I am only
able to access the last selected option.
This leads into another question. If I need to repost the form data,
including the list box data as hidden fields, how would I do this?
Please send replies to my e-mail.
Thank you for your help.
Arthur
amerar@unsu.com
------------------------------
Date: Mon, 04 Jan 1999 04:43:44 GMT
From: prjohnsonat@utahlinxdot.com (TheLaser)
Subject: Re: noop
Message-Id: <369044c4.42610431@209.66.79.182>
On Sun, 3 Jan 1999 09:41:32 -0600, tadmc@metronet.com (Tad McClellan)
wrote:
>David Formosa (dformosa@zeta.org.au) wrote:
>: In article <8r6n67.9vj.ln@magna.metronet.com>, Tad McClellan wrote:
>: >EVILjosh (engineer@noorg.org) wrote:
>: >
>: >: Is there any kind of a noop keyword in Perl?
>: >
>: >
>: > Perl is a high level language, I cannot imagine why you need
>: > a do-nothing placeholder like NOOP is in assembler.
>
>: Sometimes noop is usefull to say "I'm going to code this but not yet."
>: when testing stubbly code.
>
>
> A comment or "empty statement" (bare semicolon) isn't enough?
You can also just use a bunch of whitespace.
--
TheLaser <prjohnson at utahlinx dot com>
------------------------------
Date: Mon, 04 Jan 1999 03:06:19 GMT
From: beable@my-dejanews.com
Subject: Re: Official Perl Movie
Message-Id: <76pb7b$tcm$1@nnrp1.dejanews.com>
In article <s83o67.qml.ln@magna.metronet.com>,
tadmc@metronet.com (Tad McClellan) wrote:
> beable@my-dejanews.com wrote:
>
> : REMEMBER TO WATER YOUR CAMEL AT
> : LEAST EVERY THREE WEEKS OR IT WILL DIE!!!
>
> The -w switch will warn you of this common mistake.
>
> You should use the -w switch on *all* of your perl programs.
>
I get it! -w means "water camel"!! So I'm guessing now,
but does -f mean "feed camel"?
cheers
beable van beable
--
Beable, you moron. That was a FAKE Captain Picard you were arguing with
before. -- Riboflavin
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 04 Jan 1999 03:57:51 GMT
From: couggg@gocougs.wsu.edu
Subject: Re: Official Perl Movie
Message-Id: <76pe7u$vpl$1@nnrp1.dejanews.com>
What about "Hawmps!"???
Lawrence had the impatience and the hubris but what about laziness?
"Hawmps!" had Slim Pickens.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 04 Jan 1999 04:37:52 GMT
From: ehpoole@ingress.com (Ethan H. Poole)
Subject: Re: Path under windows
Message-Id: <AAXj2.4148$P52.21530@news15.ispnews.com>
In article <ebohlmanF4zC36.LC3@netcom.com>, ebohlman@netcom.com says...
>
>Ethan H. Poole <ehpoole@ingress.com> wrote:
>: Speaking personally, I tend to prefer to use my own code (and be
responsible
>: for its maintenance and any future bugs... I hate depending on an external
>: module only to have a new version released with a bug that makes it look
like
>: bad programming on my part <g>). It gives me total revision control (and
a
>: singular point of responsibility).
>
>The only way to achieve that is to write in assembler. Otherwise you're
>still dependent on external things like C runtime libraries.
Note that I did include that I do accept a certain degree of code
reuse...especially where it serves my needs. Rewriting a module to better
serve my needs is a relatively trivial task (no matter how complex that
module may be) compared to rewriting Perl, a C Compiler and an Operating
System for every platform out there.
>A professional programmer tests his code with new releases of modules
>before using them.
Yet *no* professional programmer can ever test his/her code with *future*
releases of someone else's modules... It is called the "future" for a
reason. Think before accusing, please. I can test every past, current, and
beta version of a module available to my heart's content. But I have no
personal control over what might be released by another author in a future
version of *their* module. I also have rather little control over what
version of a given module another user may have installed on their system. I
do have full (or as near as possible) control over my own versions, however.
Unfortunately, much of my audience, CGI users, consists of genuinely novice
programmers (at best, many can not even design a proper HTML page). Imagine
for a moment, if you will, the confusion trying to maintain *multiple*
versions of a single module (We'll call it the ABC::XYZ module to hopefully
not step on anyone's toes) within their personal cgi-bin or cgi-local space.
>I think you're really suffering from NIH syndrome, but won't admit it.
While one of the principle rules of Perl is "laziness" (i.e. reuse), I have
yet to understand why so many are totally shocked when one programmer chooses
to invoke the equally important "there's more than one way to do everything"
rule.
CPAN is a resource, but it is *not* the only way to do things.
--
Ethan H. Poole | Website Design and Hosting,
| CGI Programming (Perl & C)..
========Personal=========== | ============================
* ehpoole @ ingress . com * | --Interact2Day--
| http://www.interact2day.com/
------------------------------
Date: Mon, 04 Jan 1999 04:06:57 GMT
From: norman@Cherniak.ON.CA (Norman Branitsky)
Subject: Perl 5.005.02 installation problem
Message-Id: <36903ddd.24371527@client.news.psi.ca>
I'm trying to install Perl 5.005.02 on my UnixWare 2.1 server.
"make" ran successfully.
"make test" produced 95% success.
Error from "make install":
installperl: EXTERN.hhr.h not found at installperl line 585.
Output of modconfig:
Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
Platform:
osname=svr4, osvers=, archname=i386-svr4
uname='unix_sv cgpc0 4.2mp 2.1 i386 x86at '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='/bin/cc', optimize='-O', gccversion=
cppflags='-I/usr/include -I/usr/ucbinclude -I/usr/local/include'
ccflags ='-I/usr/include -I/usr/ucbinclude -I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='/bin/cc', ldflags ='-L/usr/ccs/lib -L/usr/ucblib
-L/usr/local/lib -L/usr/gnu/lib'
libpth=/usr/local/lib /usr/gnu/lib /shlib /lib /usr/lib
/usr/ccs/lib /usr/ucblib
libs=-lsocket -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lucb -lx
libc=/lib/libc.so.1.1, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-KPIC', lddlflags='-G -L/usr/ccs/lib -L/usr/ucblib
-L/usr/local/lib -L/usr/gnu/lib'
Suggestions appreciated.
(I've emailed this to perlbug@perl.com but haven't received a reply
yet. Could be the holiday break ;-)
------------------------------
Date: Sun, 03 Jan 1999 09:06:05 -0800
From: Phil <philweber@delphi.com>
Subject: Re: perl for winnt
Message-Id: <368FA37D.1664@delphi.com>
I have FP98, NT4.0, and PWS with httpd.
But I don't have this key in my registry.
I don't even have W3SVC.
Where does it come from? Can I add it?
I can run perl.exe with a .pl and it responds from the command line
but I get a 500 error from http://machine/cgi-bin/hello.pl
Vincent BEZARD wrote:
>
> Hi Shane,
>
> I had the same problem. My environement is the same as yours. In fact, you
> have to put in the register, the following key:
>
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Script
> Map
>
> you have to create a new string key, ".pl" and associate it with
> "c:\perl\bin\perl.exe %s %s,2"
>
> Your bin directory must be in execute only, and must be created as an alias.
>
> Vincent BEZARD
> vbezard@atos-group.com
>
> Shana Priwer a icrit dans le message
> <368798E5.AD193F6A@aba-architects.com>...
> >Hi all - still trying to set up Perl and CGI for my website, which I
> >host through IIS on a Windows NT 4 Workstation computer. Basically I
> >have a file called upload.cgi, which i
> >have in d:\winnt\system32\inetsrv\iisadmin\cgi-bin\. The first line of
> >upload.cgi, i edited to read this: $SAVE_DIRECTORY = "../../../../Perl";
> >
> >because i thought it was supposed to go to the Perl path, which is
> >d:\perl. When you try to use the upload script over the web, you get a
> >501 http error. (you can see this at
> >http://208.235.164.47/iisadmin/upload.cgi) -- could someone please
> >give me some idea of what's wrong? I've been through the FAQ and can't
> >get this resolved.
> >
> >Many thanks-
> >Shana
> >
> >
> >
> >---== http://www.newsfeeds.com - Largest Usenet Server In The World! ==---
> >
> >---== http://www.newsfeeds.com - Largest Usenet Server In The World! ==---
------------------------------
Date: Sun, 3 Jan 1999 23:20:23 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: reading a single char
Message-Id: <1dl2uni.n4xz613u3bttN@bay2-410.quincy.ziplink.net>
John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
> In article <76e4m0$6ms$1@csnews.cs.colorado.edu>,
> Tom Christiansen <tchrist@mox.perl.com> wrote:
> >--tom, the last reader on earth
>
> An insult to the millions of people who read the FAQ and don't post
> their questions here. You are hardly "the last reader on Earth". If you
> are, then I suppose I ought to take back all those books I have that
> list you as an author, since I obviously would never be able to read
> them.
No, it's more of an insult to people who are so devoid of a sense of
humor that they don't recognize tongue-in-cheek sarcasm.
No offense intended.
;-)
> Why do you feel the need to denigrate others who are acting the way you
> allegedly want them to act? If you want people to read the FAQ, don't
> claim to be the only one who can.
--ronald, the last humorous person on earth
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 3 Jan 1999 23:20:25 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Retrospective on comp.lang.perl.moderated?
Message-Id: <1dl2v19.omgwrwvyfv7iN@bay2-410.quincy.ziplink.net>
John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
> In article <1dktfwl.1jx9aol1mzemdkN@bos-ip-1-101.ziplink.net>,
> Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
> >Leslie Mikesell <les@MCS.COM> wrote:
> >> >Well, I guess that's your problem. Registering for
> >> >comp.lang.perl.moderated is no more difficult than signing up for an
> >> >electronic mailing list.
>
> That is not true. Signing up for most mailing lists requires just one
> piece of email. The first posting to .moderated requires posting a news
> article AND sending email.
That's because you only have to register if you actually want to post an
article. So there's no practical need for registering without posting
an article. Duh!
Whereas on a mailing list, you have to register even if you only want to
read the list. Thus, registering for clp.mod is actually *easier* then
signing up for a mailing-list.
> >> I know who I am. Why should I attempt to prove it to someone else
> >> using an unreliable medium just so I could answer someone else's
> >> question?
> >
> >So that every poster will read the about the many resources available
> >(documentation/FAQ, other appropriate newsgroups, etc.) *before* having
> >a message posted to the newsgroup.
>
> This is an erronious argument. Forcing Leslie to prove that his email
> address is valid once (which is all that the registration accomplishes)
> does not force anyone else to read the FAQs. It did not force me to read
> the FAQs or any other Perl documents, neither when Leslie was asked to
> register, nor when I registered.
Excuse me? I did not say that it forced anyone to read the FAQs. The
registration email provides information *about* the resources available.
And the registration instructions are buried in the message. Thus,
anyone who registers will have read *about* the resources.
Of course, we cannot force someone to read the FAQs, so I don't see why
you're trying to build your argument around that. If someone chooses
not to read the FAQs, that's too bad, but then their questions won't get
posted, so they'll be SOL. The registration process gives them the info
on where and how to get answers, and I'd say that's as much as we can
hope to do.
> >By the way, you can still answer someone else's question just by
> >emailing them directly. If that's not too much of a "bother" for you.
>
> I guess the purpose for newsgroups has been lost.
Why? Because you have to register to post? Waa waa!
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 3 Jan 1999 23:20:26 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Retrospective on comp.lang.perl.moderated?
Message-Id: <1dl2vkr.c8ror1jiygtbN@bay2-410.quincy.ziplink.net>
John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
> Since most lists require just one email, yes, I'm sorry, it is harder to
> make the first posting to .moderated. "post+mail" is harder than "mail",
> even if the difficulty of either part is small. Perhaps you would
> recognize it in math terms? (.0001 + .0001) > .0001 Will you believe
> this statement or do I need to provide a perl script that proves it?
You're comparing apples and oranges. You were going to send the post
anyway, otherwise you wouldn't have needed to register.
Actions required:
Read Only Register & Contribute
---------------------------------------------
Mailing list | mail mail+mail
clp.mod | none post+mail
So, it's no harder to contribute to clp.mod than it is to contribute to
a mailing list, and it's easier to start reading clp.mod than to start
reading a mailing list.
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 4 Jan 1999 00:14:48 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Rookie CGI problem
Message-Id: <76p15o$1a0$1@gellyfish.btinternet.com>
On Sun, 03 Jan 1999 13:36:44 -0800 Miguel Fernandez wrote:
> I keep getting the message:
>
> CGIwrap Error: System Error: execv() failed
>
> Error: No such file or directory (2)
>
This is not a Perl error message - it would however suggest that your
'CGIwrap' is not able to find your Perl script (whatever CGIwrap is). The
problem would be to do with either the configuration of your server or
the request that is being issued to it - I'm afraid that either of these
issues are out of the scope of this group.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 03 Jan 1999 20:02:41 -0500
From: Eugene Sotirescu <eugene@verticalnet.com>
To: Miguel Fernandez <mig@pwave.com>
Subject: Re: Rookie CGI problem
Message-Id: <36901331.CA812FD7@verticalnet.com>
I see, one of Matt's notorious scripts . . .
Your error has nothing to do with the script though. Your ISP is probably using
the CGIWrap program to let you run the script as yourself (instead of the server).
Something is amiss there. Your best bet is to ask your ISP (netcom?) about this
(or check their online resources).
(And no, please don't post the source of CGIWrap ;--------------) )
Good luck.
Miguel Fernandez wrote:
>
> Here it is...
>
> #!/usr/local/bin/perl
> ##############################################################################
> # FormMail Version 1.6 #
> # Copyright 1995-1997 Matt Wright mattw@worldwidemart.com #
> # Created 06/09/95 Last Modified 05/02/97 #
> # Matt's Script Archive, Inc.: http://www.worldwidemart.com/scripts/ #
> ##############################################################################
------------------------------
Date: Sun, 3 Jan 1999 21:27:03 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Security & Permissions: Why can't Perl read files from the owner level?
Message-Id: <7ecp67.7tp.ln@magna.metronet.com>
Charles R. Thompson (design@raincloud-studios.com) wrote:
: So how in the heck does someone protect a directory from outside access when
: Perl seems to require at least a 755 before it will read a file in it?
^^^^^^^^^^^^^^^^
Perl doesn't require that. It just calls the OS. Operating
Systems are responsible for managing files.
The _OS_ is requiring that.
If you wrote your CGI program in C, you would have the same problem.
: I guess my *real* question is how can Perl read a file I *want* set to
: rw-r-r?
Perl can read a file with those permissions just fine
(try it from the command line).
A CGI program may not be able to though...
: Am I incredibly dense today?
Well, the sentence quoted above seems to be spot on ;-)
You don't have a Perl problem.
You are asking in the wrong newsgroup.
Try asking in a newsgroup that has some connection to CGI
programming and/or servers, such as:
comp.infosystems.www.authoring.cgi
comp.infosystems.www.servers.unix
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 03 Jan 1999 20:20:43 -0500
From: Eugene Sotirescu <eugene@verticalnet.com>
To: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: Security & Permissions: Why can't Perl read files from the owner level?
Message-Id: <3690176B.7005EF47@verticalnet.com>
Any script should be able to read rw-r--r-- files as long as the owner of the
file and the script are the same.
Charles R. Thompson wrote:
> So how in the heck does someone protect a directory from outside access when
> Perl seems to require at least a 755 before it will read a file in it?
>
> I'm able to read my libraries when they are rw-r--r-- .. I am assuming this
> is because I am using require. However, if I have a users.db(rw-r--r--) file
> in a subdirectory under cgi-bin which I OPEN , CgiDie complains it cannot
> open the file. Change the permissions so the whole world can peek at it and
> it works fine.
>
> My script is a mod of one I downloaded where require was used, then the file
> parsed and printed to the browser. This seems like excessive overhead when I
> feel my Perl script should be able to read the file directly.
>
> I guess my *real* question is how can Perl read a file I *want* set to
> rw-r-r?
>
> Am I incredibly dense today?
>
> CT
------------------------------
Date: Sun, 03 Jan 1999 19:19:52 -0600
From: Benjamin Curtis <bgcurtis@surfree.com>
Subject: Sorting a hash
Message-Id: <36901738.B3C7C6C@surfree.com>
Is there a way to sort a hash by the values?
--
Benjamin Curtis
http://www.advanced-net-tech.com/
---== http://www.newsfeeds.com - Largest Usenet Server In The World! ==---
------------------------------
Date: 03 Jan 1999 18:33:27 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Sorting a hash
Message-Id: <yliuen6a2w.fsf@windlord.stanford.edu>
Benjamin Curtis <bgcurtis@surfree.com> writes:
> Is there a way to sort a hash by the values?
Depending on what you want to do, 'sort values %hash' may be what you're
looking for.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Sun, 03 Jan 1999 19:44:48 -0500
From: Mike <blazer@mail.nevalink.ru>
Subject: strange behavior of $~
Message-Id: <36907F80.7BE5A75D@mail.nevalink.ru>
Hi,
I'm usually r/w to Perl-Win32 lists but this lettle problem has nothing
in common with Win32.
I'm writing small pwd-checker rather in JAPH (or obfuscated) style. This
sample is a small extraction:
$a ="ba0bc";
$,=97; # ASCII code of 'a'
$a=~s>.>($_=ord($&)-$,)\>=0?chr:chr hex$&>gse;
print $a;
This returns as expected "\x01\x00\x00\x01\x02" i.e. 5 chars.
But when I use $~ instead of $a
$~ ="a0abc";$,=97;
$~=~s>.>($_=ord($&)-$,)\>=0?chr:chr hex$&>gsex;
print $~;
not the same. In fact if no char in $~ evaluates to hexadec 00 -
everything works the same. But in this sample it returns only "\x01"
i.e. it stops when the ongoing character evaluates to 00. I.e. $~
behaves like C-string.
Not good?
I'm using GSAR port of perl 5.004_02 but I guess that small bug can be
still alive.
Thanks and season greetings.
--
==================================
Mike Blazer
blazer@mail.nevalink.ru
http://www.dux.ru/guest/fno/perl/
==================================
------------------------------
Date: Sun, 03 Jan 1999 22:48:20 -0500
From: Mike <blazer@mail.nevalink.ru>
Subject: Re: strange behavior of $~
Message-Id: <3690AA84.DC2690B6@mail.nevalink.ru>
>
> $~ ="a0abc";$,=97;
> $~=~s>.>($_=ord($&)-$,)\>=0?chr:chr hex$&>gse;
> print $~;
And even more. $>, '$,'(I replaced $,=97; to $.=97), $<, $- used instead
of $~ all return unexpected result. But $;, $: can handle binary data.
$| can be only 0 or 1.
$|=7; print $|; prints 1
Is there any reason that these variables have such a strange behavior? I
see, $| is always used as TRUE/FALSE flag, but there is a clear rule in
perl - what's TRUE and what's false. And "everything is possible that is
not forbidden" ;)
Thanks for any input on this problem.
--
==================================
Mike Blazer
blazer@mail.nevalink.ru
http://www.dux.ru/guest/fno/perl/
==================================
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 V8 Issue 4540
**************************************