[13194] in Perl-Users-Digest
Perl-Users Digest, Issue: 604 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 20 16:13:28 1999
Date: Fri, 20 Aug 1999 13:10:18 -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 Fri, 20 Aug 1999 Volume: 9 Number: 604
Today's topics:
Re: Request for Comments: www.perl.com rlw_ctx@my-deja.com
Re: Request for Comments: www.perl.com ()
Re: Request for Comments: www.perl.com <mikecard@my-deja.com>
search script guys2@mailandnews.com
Re: setuid <paul.glidden@unisys.com>
SMTP connections <freek@coolmail.net>
Sort Files by Date and then Name (Phillip Armitage)
Re: Split comp.lang.perl.misc <cassell@mail.cor.epa.gov>
Re: Split comp.lang.perl.misc <cassell@mail.cor.epa.gov>
Re: taint checking code, not data <cassell@mail.cor.epa.gov>
What are valid characters in hash keys (Roger Musson)
Re: What editors are folks using for PerlScript develop <keithmur@mindspring.com>
Re: Why $|++ (was: Re: perl system()) <cassell@mail.cor.epa.gov>
Re: Why would this autovivify - answers? opinions? <bivey@teamdev.com>
Re: Win32 Perl (newbie) <laurensmith@sprynet.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 20 Aug 1999 18:06:47 GMT
From: rlw_ctx@my-deja.com
Subject: Re: Request for Comments: www.perl.com
Message-Id: <7pk5fd$56d$1@nnrp1.deja.com>
In article <Pine.HPP.3.95a.990820165322.20918J-100000@hpplus03.cern.ch>,
"Alan J. Flavell" <flavell@mail.cern.ch> wrote:
> But I digress. The point was to discuss the merits and demerits of a
> specific site, that seems to have been designed specifically for
> graphical browsers, forgetting the niceties of text-mode access (by
> all kinds of text mode client, of which the Lynx browser is only one).
Actually, I have encountered a talking browser running on a
Macintosh. I suppose it could have been derived from Lynx....
Looking at it with Lynx 2.8, www.perl.com, it was usable,
but clumbsey. But if I has to rely on a talking browser,
I think it would be difficult.
--
Ron Wilson
Connectex, LLC
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 20 Aug 1999 19:02:36 GMT
From: karger@fermi2.chem.yale.edu ()
Subject: Re: Request for Comments: www.perl.com
Message-Id: <7pk8oc$q3$1@news.ycc.yale.edu>
Tom Christiansen (tchrist@mox.perl.com) wrote:
: I would like to solicit from you answers to the following questions:
: What you like at www.perl.com
- Lots of content.
- No <blink> tags.
: What you don't like at www.perl.com
I didn't look at too much of the site except to note that it has a bunch of
content, so basically my thoughts are about the main web page.
- As others have mentioned, the front page doesn't quite work. The side navbar
is great, a lot of the other things are great too, but it's just too darn
busy. It's like someone was told they only get 14 inches of vertical space.
In fact, the wonderful thing about the scroll bar is that you can keep on
scrolling. I think I would like the site better if it didn't have three
columns. Maybe get rid of the right column? If you do want to keep the three
columns, I would do it more like slashdot: make one of the columns tiny.
Otherwise the central column doesn't look like the main text on the page.
- The recipe of the day seems more like a side-column thing to me (even if
it's supposed to be an oreilly plug). OTOH, what's new seems more like a
central column thing. And put a "Features" title on the features, or
whatever you want to call them.
- The reference section is pretty impressive.
-Amir Karger
karger@post.harvard.edu
------------------------------
Date: Fri, 20 Aug 1999 19:37:03 GMT
From: mike cardeiro <mikecard@my-deja.com>
Subject: Re: Request for Comments: www.perl.com
Message-Id: <7pkaou$9gu$1@nnrp1.deja.com>
In article <37bc93cd@cs.colorado.edu>,
tchrist@mox.perl.com (Tom Christiansen) wrote:
> I would like to solicit from you answers to the following questions:
> What you don't like at www.perl.com
> --tom
the biggest problem i've encountered is some (not all) of the
documentation is not formatted to fit any screen...so you end up with
that pesky little horizontal scroll bar at the bottom and have to scroll
left to right for every line you read...YUCK
mike cardeiro
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 20 Aug 1999 20:29:55 +0200
From: guys2@mailandnews.com
Subject: search script
Message-Id: <37BD9EA3.7BB8@mailandnews.com>
Hi Everybody,
Who can tell me where I can download a free CGI search script or who can
send me a working one. The script must be capable of searching only the
directorie(s) given in the script.
Thanks in advance
------------------------------
Date: Fri, 20 Aug 1999 14:04:40 -0500
From: "Paul Glidden" <paul.glidden@unisys.com>
Subject: Re: setuid
Message-Id: <7pk8mn$r8d$1@eanews1.unisys.com>
I agree that you will need to use carp to get a more verbose error message.
If the external executable has the other execute bit set it should be able
to be executed from the uid of the process that is connected to your web
server.
Make sure your not executing the external program using relative path names,
sometimes the webserver uses virtual paths and relative path names may not
work properly.
poocus@my-deja.com wrote in message <7pjl29$npk$1@nnrp1.deja.com>...
>I'm new to perl so be gentle with me...
>
>I have a script that runs on a web server, the script uses a system call
>to run an external executable, it works fine from the command line, but
>not when executed via the web server, I think the problem is that the
>web ID via the web server has no permissiions to execute external
>executables, so, is it possible to set the user id to one with
>permissions, within the perl script in order to run the external
>executable. The external executable has the following permissions set:
>-rwxr-xr-x
------------------------------
Date: Fri, 20 Aug 1999 11:13:00 -0700
From: frEEk <freek@coolmail.net>
Subject: SMTP connections
Message-Id: <37BD9AAC.3E9EFCD8@coolmail.net>
I have written a very small,job specific smtp mail sender, but it is
proving to be disgustingly slow. With 10 processes running in parrallel,
it only manages an average of 2-3 emails a sec, and that's with
persistent connections (domain grouping) and no DSN (cached IPs are
supplied). It almost seems that only one process is running at a time.
Is it possible that you can't have >1 sockets open to the outside at
once? I'm sure this is wrong. Also, a few of the processes are hanging
indefinitely on WCHAN tcp_re (or something like that) which leads me to
ask, is there no timeout for using sockets with the root module? Do I
have to use alarms and catch the signals to avoid waiting for a response
forever? Any help is much appreciated as I can't seem to find any
answers in the docs.
Thanks a bunch
--
Life is out to get me...
ERTW!
------------------------------
Date: Fri, 20 Aug 1999 18:33:30 GMT
From: armitagep@wzmh.com (Phillip Armitage)
Subject: Sort Files by Date and then Name
Message-Id: <37bd9a87.4830365@n3.idirect.com>
I'd like to put together a PERL routine which will read the names of
files in a given subdirectory, and then sort then by name and file
date. eg. List all the files added to the directory today in
alphabetical order, then list the files added yesterday in
alphabetical order, and so on.
My currect code
@files=sort(map(uc($_),grep(m/$FILETYPE$/i,readdir(DIR))));
sorts by uppercase filename. I want to add in the date sorting
capability
If I were working in DOS I would obtain this kind of listing with the
command: DIR /O-DN *.*
Anyone know if thiere exists a PERL function which will perform this
function. Otherwise, any suggestions on where to find or how to write
(pseudocode) this PERL code?
I'm using Perl for Win32, running on a Windows 95C system
I look forward to your comments and suggestions.
------------------------------
Date: Fri, 20 Aug 1999 12:06:04 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Split comp.lang.perl.misc
Message-Id: <37BDA71C.42C9CB3F@mail.cor.epa.gov>
Jonathan Stowe wrote:
[snip]
> These kind of suggestions come up every once in a while like some kind of
> weird ritual and the conclusion is always the same - we dont need more
> groups we need more clueful posters.
I think the interval between suggestions is related to the time
a new person (who has not seen the previous thread) needs before
he or she decides that enough is enough.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 20 Aug 1999 12:11:37 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Split comp.lang.perl.misc
Message-Id: <37BDA869.5D6619BE@mail.cor.epa.gov>
James Liu wrote:
>
> Yeah, but moderation would be much easier. Having smaller groups would be
> easier to have moderation in them, so none of that junk will get there.
You missed Jonathan's point. Having more groups doesn't make
this one get any smaller. Splitting the comp.lang.perl
group into the hierarchy you see today didn't significantly
reduce traffic in the large group. It only produced a few
groups [some of which are moderated] which have low traffic
and high signal/noise ratio. And it produced some crossposts
to as many of these groups as the poster could manage, which
increases overall traffic.
There is no known way to make someone post in the right place
if that person cannot be bothered to read the directions on
the back of the box. The PSI::Telekinesis module [when it
is working] only lets you hit them on the head with a rubber
chicken when they finish reading your reply.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 20 Aug 1999 11:44:07 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: taint checking code, not data
Message-Id: <37BDA1F7.70A90D99@mail.cor.epa.gov>
Yeoh Yiu wrote:
>
> I see just about every security check advocates taint checking
> and laundering data, and cleaning up the $ENV{PATH}.
>
> I don't see anything about a safe way to run random code.
> Well, I see references to Penguin, but judging by
> http://www.cpan.org/modules/by-module/Penguin/FSG/Penguin-3.00.readme
> I would think it's not quite complete, and not actively developed.
Check out the Safe module. It comes with the installation.
> What I want to be able to do is eg run Abigail's JAPH .sig not worry.
> Maybe run more evil or carelessly copied & pasted code, too.
You don't think Abigail's code is the most evil available?
:-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 20 Aug 1999 19:56:22 GMT
From: roger@wheelpro.co.uk (Roger Musson)
Subject: What are valid characters in hash keys
Message-Id: <37bdb0d0.7728767@nntp.netcomuk.co.uk>
$hash{key}='some_value';
What are the valid characters for 'key'
I can't find any reference to this anywhere, all examples use
alphanumeric.
Thanks,
Roger Musson
------------------------------
Date: Fri, 20 Aug 1999 15:02:12 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: What editors are folks using for PerlScript development?
Message-Id: <37BDB444.F186EBF4@mindspring.com>
Mike wrote:
>
> my editor of preference is vi. there is an initial learning curve that many
> people absolutely hate and is why many don't and won't use it. (WUSSIES :o)
> ). but when you take the time to learn it.... it is much much faster than any
> editor that uses a mouse. HANDS DOWN.
^^^^^^^^^^
Yes, that is *exactly* it! (Did you realize the aptness of this when
you wrote it? A poet once told me, "Always take credit for your
intuition!")
> Plus if you ever have to use telnet to
> repair a program I'd like to see anyone bring up a visual editor with that
> one.
Yes, this is true also. Vi just seems to belong with telnet.
I'm sorry. I know this was way OT, but I just loved the "hands down"
remark.
------------------------------
Date: Fri, 20 Aug 1999 12:03:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Why $|++ (was: Re: perl system())
Message-Id: <37BDA698.897F9A50@mail.cor.epa.gov>
Abigail wrote:
>
> David Cassell (cassell@mail.cor.epa.gov) wrote on MMCLXXX September
> MCMXCIII in <URL:news:37BC9BE1.C225EA2D@mail.cor.epa.gov>:
> ##
> ## $|++;
>
> Why "$|++;"? I've seen this before, and frankly, it baffles me why
> someone would want to use this instead of "$| = 1;".
Choose one:
[A] I never thought there would be a speed difference.
[B] I saw it in grownups' code, tried it, played with it, and
didn't find any problems.
[C] An answer deliberately less clear than: $| = 1;
[D] Channeling cargo-cult script-kiddies in my spare time, using
the PSI::ESP module's ShirleyMaclaine() function.
> Would it be faster? No... a simple benchmark shows it's slower,
> by almost a factor of 2.5:
[snip of benchmark]
Thanks. It never occurred to me that there would be a
difference, so I never ran Benchmark. Given the number of
reps, do you consider this difference to be important? Real?
> Would it be clearer? Well, no, not at all. "$| = 1;" tells it all, while
> to know what "$| ++;" does, you would need the previous value of "$|".
>
> Is it that "$| = 1;" isn't always correct? Well, in fact, "$| = 1;" will
> *always* turn of buffering, while "$| ++;" would enable buffering if, for
> whatever reason, "$| == -1;".
You're complaining about giving less-than-transparent answers?
But you are right here. I don't think I have written any code
where I used $|--; to recover previous state and decide when to
turn buffering back on. So what is the point?
> So, except for being obscure on purpose, why "$| ++;"?
>
> Or is this some form of cargo cult programming?
See quiz above. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 20 Aug 1999 18:33:03 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: Why would this autovivify - answers? opinions?
Message-Id: <01beeb3a$25565d00$583c08cf@bill.jump.net>
Ala Qumsieh <aqumsieh@matrox.com> wrote in article
<x3yiu6acxwb.fsf@tigre.matrox.com>...
>
> My first thought would be: UPGRADE. Build 518 is the latest I
> believe.
I'm coming to that conclusion myself...
> > $g_CurHashRef = \%{$g_DescHash{$Label}};
>
> It would be faster to simply do this:
>
> $g_CurHashRef = $g_DescHash{$Label};
Produces the same result/error, though. I ended up
just copying the hash:
%g_CurHash = %{$g_DescHash{$Label}};
Not enough of a performance hit to worry about and it doesn't
generate any funky extra entries in the master hash like the
other stuff did.
> I can't give a good explanation. I couldn't reproduce your problem on
> my version of Perl (version 5.004_04 built for sun4-solaris).
> Perhaps its a bug. Try with the latest version of Perl.
>
> HTH,
> Ala
Thanks for trying it. I suspect it IS a bug (or a feature)
in 518 for Win32. Time to upgrade (and then convince
everyone else above me it's a good idea). -Wm
------------------------------
Date: Fri, 20 Aug 1999 09:53:23 -0700
From: "Lauren Smith" <laurensmith@sprynet.com>
Subject: Re: Win32 Perl (newbie)
Message-Id: <7pk167$7sr$1@brokaw.wa.com>
James Liu wrote in message ...
>David Cassell <cassell@mail.cor.epa.gov> wrote in message
>news:37B339E5.72377D92@mail.cor.epa.gov...
>> James Liu wrote:
>> >
>> > I got Oreilly's Learning Perl (Llama book). I'm running Windows
98.
>what
>> > should I know about how perl runs on windows? please help.
>>
>> In addition to Lauren's advice to get ActiveState Perl [build 518
>> now], I recommend that you go trade that llama for a gecko.
>> Get "Learning Perl on Win32 Systems" by Randal Schwartz, Erik
>> Olson, and, hmmm.. let's see.. oh some guy who hates win32.
>> :-)
>Did I also mention that i'm broke?
>
>where do you expect I could get it traded?
Seeing as how Amazon and the local Barnes&Noble sell the llama but not
the gecko at a discounted price, I imagine you'd have to pay the
difference if you wanted to exchange the llama for the gecko.
If you are strapped for cash, the llama book should suffice for a while.
The Perl language itself is the same between platforms, so the books
contain very similar information. In fact, the gecko looks like the
llama with some Win32 specific stuff grafted on. If you need the Win32
stuff, your Activestate Online Documentation contains a list of modules,
including Win32 modules, and their docs (just scroll to the bottom of
the left frame).
Lauren
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 604
*************************************