[23497] in Perl-Users-Digest
Perl-Users Digest, Issue: 5707 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 24 06:05:53 2003
Date: Fri, 24 Oct 2003 03:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 24 Oct 2003 Volume: 10 Number: 5707
Today's topics:
Re: Balanced Text?? <michael.p.broida@boeing_oops.com>
Re: Balanced Text?? (Tad McClellan)
Re: DBI & primary keys <tore@aursand.no>
Re: Finding all used fileno's ? <ldo@geek-central.gen.new_zealand>
Re: GD module <mgjv@tradingpost.com.au>
Re: GD module <mgjv@tradingpost.com.au>
Re: How to catch runtime error? (Anno Siegel)
Re: Is there a better way than using $+ ? <neil.shadrach@bt.com>
matching ?? (Tim)
Re: matching ?? <ak+usenet@freeshell.org>
Re: matching ?? <bernard.el-haginDODGE_THIS@lido-tech.net>
Re: performance arrays vs hashes <tore@aursand.no>
Re: Perl and IIS - script runs but 'The page cannot be (stew dean)
Posting Guidelines for comp.lang.perl.misc ($Revision: tadmc@augustmail.com
Re: rsh & perl -Directory creation not possible <me@privacy.net>
Re: Simulating case sensitivity for win32 files (Malcolm Dew-Jones)
Re: Taint - having some real trouble here, taint/perl e foo2@on-spammers2.com
Re: Taint - having some real trouble here, taint/perl e <flavell@ph.gla.ac.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 23 Oct 2003 22:24:08 GMT
From: MPBroida <michael.p.broida@boeing_oops.com>
Subject: Re: Balanced Text??
Message-Id: <3F985508.FC429DC0@boeing_oops.com>
MPBroida wrote:
>
> Hi!
> I've seen this mentioned here before, but I can't find
> the specific messages. It's not directly in the FAQ,
> either, though it's a "standard" response to questions
> about nested parens/etc when asked in this newsgroup.
>
> But I don't recall whether the package/module is:
> Text::Balanced
> or:
> Balanced::Text
>
> Neither is installed here, so I need the CORRECT name
> so I can request that it be acquired and installed.
>
> Thanks!
> Mike
Thanks, all, for the responses!
Mike
------------------------------
Date: Thu, 23 Oct 2003 20:57:45 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Balanced Text??
Message-Id: <slrnbph1op.7r1.tadmc@magna.augustmail.com>
MPBroida <michael.p.broida@boeing_oops.com> wrote:
> I've seen this mentioned here before, but I can't find
> the specific messages. It's not directly in the FAQ,
> either,
Yes it is.
> But I don't recall whether the package/module is:
> Text::Balanced
> or:
> Balanced::Text
perldoc -q Balanced
Can I use Perl regular expressions to match balanced text?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 24 Oct 2003 05:02:33 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: DBI & primary keys
Message-Id: <pan.2003.10.23.15.51.48.982829@aursand.no>
On Thu, 23 Oct 2003 13:08:50 +0000, Bart Lateur wrote:
> p.s. Why does almost every reply to every question on MySQL here have to
> end up with mySql-bashing?
Doesn't that speak for itself? :-)
--
Tore Aursand <tore@aursand.no>
------------------------------
Date: Fri, 24 Oct 2003 13:22:19 +1300
From: Lawrence D¹Oliveiro <ldo@geek-central.gen.new_zealand>
Subject: Re: Finding all used fileno's ?
Message-Id: <ldo-C2A4FC.13221924102003@news.wave.co.nz>
In article <3f932665$0$199$75868355@news.frii.net>,
Nicholas Dronen <ndronen@io.frii.com> wrote:
>...t fstat seems to be
>a better approach than open on UNIX.
>
>#!/usr/bin/perl
>use POSIX qw/fstat/;
>for (0 .. 25) {
> print "$_ is open\n" if fstat $_;
>}
>$ ./fds
>0 is open
>1 is open
>2 is open
Clever approach, but you may want to raise the upper limit number. A
quick check of this Linux login session I have open shows fd number 255
open on the terminal device.
How did I discover this? By using procfs, of course. procfs is probably
a more efficient way of doing the same thing as above, but it's
Linux-specific.
------------------------------
Date: 23 Oct 2003 23:07:59 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: GD module
Message-Id: <slrnbpgnqh.ppp.mgjv@verbruggen.comdyn.com.au>
On Thu, 23 Oct 2003 20:20:58 +0200,
Bart van den Burg <bart-news@NOSPAMtvreclames.nl> wrote:
> Hey
>
> I'm wondering how much processor power scripts using the GD module use.
That depends entirely on what you do.
Generally, however, of the modules that are available to create image
graphics, GD is the lightest on the CPU, and the fastest.
> at this moment i have an average of 50 visitors per day at
> http://www.tvreclames.nl, and everything seems well now, but i'm wondering
> if it may become just too much if i get more visitors. The first image is on
> every page 5 times, each time with a different value. Will this become a
> problem, or is GD fast enough for it?
The only way you can find out whether _your machine_ is fast enough to
support more load is by testing. find out where the limits are, and
scale your machinery accordingly.
Depending on the amount of work you do to create an image (I haven't
followed the links), it may very well be possible that the CGI and
Perl overheads are higher than the GD CPU usage. In that case, writing
a C plugin that interfaces directly with your web server would
probably be a better way to optimise.
I'd wager, however, that it'd be cheaper just to upgrade the hardware.
Martien
--
|
Martien Verbruggen | My friend has a baby. I'm writing down all
Trading Post Australia | the noises the baby makes so later I can ask
| him what he meant - Steven Wright
------------------------------
Date: 23 Oct 2003 23:13:36 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: GD module
Message-Id: <slrnbpgo52.ppp.mgjv@verbruggen.comdyn.com.au>
On Thu, 23 Oct 2003 20:50:02 +0200,
Bart van den Burg <bart-news@NOSPAMtvreclames.nl> wrote:
[snip of worry about performance of GD, and answer by someone telling
OP to stress test]
> the request for the first one takes 225 ms... imo it's a bit too much
> because that will already take at least 1 second per page. I do you think it
> might be smarter to just produce 101 (0..100) images instead of rendering
> them realtime? I guess the other graph can stay just the way it is since it
> isn't requested that much
If there are only 101 images possible, then the calculation becomes
easy:
If you expect more than 101 requests between the times that you need
to regenerate all your images, you should batch generate them, and
just serve them up. If you expect fewer, then you should keep them
dynamic. If all images are static, you also do not need the CGI and
Perl overhead for each image request.
You could even take an intermediate approach, and cache the images
after generation, so the next identical request won't have to
regenerate them. With this approach, however, even a cached image
still is served through a CGI interface by a Perl process, even though
GD won't need to do any work.
Because of the really low number of possible images, I'd say that it's
probably best to generate static images, and just refer to those.
Martien
--
|
Martien Verbruggen | Freudian slip: when you say one thing but
Trading Post Australia | mean your mother.
|
------------------------------
Date: 24 Oct 2003 09:35:39 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to catch runtime error?
Message-Id: <bnarpb$8o0$1@mamenchi.zrz.TU-Berlin.DE>
Tad McClellan <tadmc@augustmail.com> wrote in comp.lang.perl.misc:
> laszlo <GlgAs@Netscape.net> wrote:
>
> > If I run it from command mode with -W parameter I get
> >
> > "Use of unitialized value in concatenation (.) or string in a.txt line
> > 9.
> >
> > error message for every execution of the sub
>
>
> That is not an error message.
>
> That is a warning message.
>
>
> > However if I use in IIS (WIN2000 Service pack 4; Active State Perl
> > 5.8 806) inside a larger program as part of an
> >
> > eval({$program})
> > if ($@) {report the error; die}
> >
> > statement, the program does not report any error just dies and the
> > browser (IE 6.0) shows an irrelevant "the page cannot be displayed"
> > error message.
>
>
> Does it put the message in the web server's log?
>
>
> > Any help appreciated
>
>
> Warnings are not trapped the same way as errors, see
>
> perldoc -f eval
>
> for how to use $SIG{__WARN__}.
As an alternative, one can make the warning in question fatal and
catch it in eval. In this case:
eval { use warnings FATAL => qw( uninitialized); <whatever> }
That is sometimes easier than fiddling with a handler.
Anno
------------------------------
Date: Fri, 24 Oct 2003 07:42:01 +0000 (UTC)
From: Neil Shadrach <neil.shadrach@bt.com>
Subject: Re: Is there a better way than using $+ ?
Message-Id: <bnal48$3el$1@visp.bt.co.uk>
Brian McCauley wrote:
> But you should use $#+ not defined($+). Consider
>
> @a = 'foo' =~ /foo|(bar)|(baz)/;
>
> Here @a is correctly set to ( undef, undef ) not () but $+ is left
> undefined.
Ah. Thanks for that.
------------------------------
Date: 24 Oct 2003 01:43:10 -0700
From: tvn007@hotmail.com (Tim)
Subject: matching ??
Message-Id: <21724be2.0310240043.3fdf1120@posting.google.com>
data: s1 s2 s3 0.900 0.890 0.588
data2: s1 s2 s3 2.900F 1.890F 0.888
data3: s1 s2 s3 1.900F 6.890F 0.388F
My ReqX:
I would like to store the data in @name using the expression below:
@name = m/(\d+\.\d+)/g;
however, It does not ALWAYS work because for this case
data2: s1 s2 s3 2.900F 1.890F 0.888
$name[0] = 2.900 but I want $name[0] = 2.900F
$name[1] = 1.890 but I want $name[1] = 1.890F
$name[2] = 0.888
Please help.
------------------------------
Date: Fri, 24 Oct 2003 08:46:04 +0000 (UTC)
From: Andreas Kahari <ak+usenet@freeshell.org>
Subject: Re: matching ??
Message-Id: <slrnbphpmc.s0e.ak+usenet@vinland.freeshell.org>
In article <21724be2.0310240043.3fdf1120@posting.google.com>, Tim wrote:
> data: s1 s2 s3 0.900 0.890 0.588
> data2: s1 s2 s3 2.900F 1.890F 0.888
> data3: s1 s2 s3 1.900F 6.890F 0.388F
>
> My ReqX:
> I would like to store the data in @name using the expression below:
> @name = m/(\d+\.\d+)/g;
[cut]
What about
@name = m/(\d+\.\d+F?)/g;
or maybe
@name = m/(\d+\.\d+\w?)/g;
--
Andreas Kähäri
------------------------------
Date: Fri, 24 Oct 2003 08:55:18 +0000 (UTC)
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: matching ??
Message-Id: <Xns941E6EE4D727Belhber1lidotechnet@62.89.127.66>
tvn007@hotmail.com (Tim) wrote in news:21724be2.0310240043.3fdf1120
@posting.google.com:
> data: s1 s2 s3 0.900 0.890 0.588
> data2: s1 s2 s3 2.900F 1.890F 0.888
> data3: s1 s2 s3 1.900F 6.890F 0.388F
>
> My ReqX:
> I would like to store the data in @name using the expression below:
> @name = m/(\d+\.\d+)/g;
> however, It does not ALWAYS work because for this case
>
> data2: s1 s2 s3 2.900F 1.890F 0.888
> $name[0] = 2.900 but I want $name[0] = 2.900F
> $name[1] = 1.890 but I want $name[1] = 1.890F
> $name[2] = 0.888
>
> Please help.
So just add the possibility of F appearing after the number:
@name = m/(\d+\.\d+F?)/g;
If it's not always F you'll have to modify that depending on what can
appear after the number.
Cheers,
Bernard
------------------------------
Date: Fri, 24 Oct 2003 05:02:33 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: performance arrays vs hashes
Message-Id: <pan.2003.10.24.02.55.50.133828@aursand.no>
On Thu, 23 Oct 2003 06:16:31 -0500, Eric J. Roode wrote:
>> I don't use quotes when working with variables, of course;
>>
>> my $value = $hash{ $key };
>>
>> Hmm. But I tend to carry around those spaces, I see. :-) Easier to
>> read?
> It's a matter of taste. I prefer omitting the quotes, because to me,
>
> $hash{foo}
>
> is analogous to
>
> $array[7]
>
> and you don't write $array['7'], do you?
No, but that's because numbers _and_ strings are highlighted in my editor,
so I assume everything boils down to the editor;
$hash{ 'foo' }; # highlighted
$array[ 7 ]; # highlighted (as number)
$array[ '7' ]; # highlighted (as string)
$hash{ foo }; # not highlighted
I'm referring to the value inside {} and [] when talking about
highlighted, of course.
Anyway: Nothing to do with Perl. Move on. Nothing to see here. :-)
--
Tore Aursand <tore@aursand.no>
------------------------------
Date: 23 Oct 2003 15:22:58 -0700
From: stewart@webslave.dircon.co.uk (stew dean)
Subject: Re: Perl and IIS - script runs but 'The page cannot be displayed'
Message-Id: <2b68957a.0310231422.40625b06@posting.google.com>
"Alan J. Flavell" <flavell@ph.gla.ac.uk> wrote in message news:<Pine.LNX.4.53.0310231121460.12628@ppepc56.ph.gla.ac.uk>...
> On Thu, 23 Oct 2003, Abigail exposed the fact that:
>
> > stew dean (stewart@webslave.dircon.co.uk) wrote on MMMDCCV September
> > MCMXCIII in <URL:news:2b68957a.0310230145.498158bc@posting.google.com>:
>
> > ** Hang on - why does your name ring a bell? My god - it's the same Alan
> > ** Flavell I used to talk about HTML to way back in 1996.
>
> I was responding specifically to the current issues. I saw no reason
> to rake-over past acrimony.
>
> > You where the
> > ** one who was saying HTML should not be used for layout.
>
> I'm one who's saying that the web has now finally caught up with the
> recognition that HTML would better not be used for layout. The idea
> of using stylesheets pre-dated RFC1866/HTML2.0, and it should have
> been obvious to anyone who bothered to rub two brain cells together
> that they were a good approach. It's taken too long to get there, but
> it's finally happening, and I find that development rather positive.
I think I remember us agreeing on style sheets. If you go back you'll
see many of the things I predicted did indeed come true. The way style
sheets where adopted played out as I described - it was dependent on
adoption by browsers and by those who have made a living from the web,
people like myself.
Style sheets now mean HTML is used for detailed layout. It now
includes pixel level positioning and point sizes. It also allows a
greater amount of what I have preached for many years - pages that
degrade gracefully.
> > (I talked about HTML way back in 1996 (and even before as well). I said
> > then, and I still say, that HTML should not be used for layout.
>
> Indeed.
But it is, and has been for over seven years. Where have you been?
Stew Dean
------------------------------
Date: Fri, 24 Oct 2003 02:22:58 -0500
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.4 $)
Message-Id: <BvydnQNsvqvPTgWiRVn-vw@august.net>
Outline
Before posting to comp.lang.perl.misc
Must
- Check the Perl Frequently Asked Questions (FAQ)
- Check the other standard Perl docs (*.pod)
Really Really Should
- Lurk for a while before posting
- Search a Usenet archive
If You Like
- Check Other Resources
Posting to comp.lang.perl.misc
Is there a better place to ask your question?
- Question should be about Perl, not about the application area
How to participate (post) in the clpmisc community
- Carefully choose the contents of your Subject header
- Use an effective followup style
- Speak Perl rather than English, when possible
- Ask perl to help you
- Do not re-type Perl code
- Provide enough information
- Do not provide too much information
- Do not post binaries, HTML, or MIME
Social faux pas to avoid
- Asking a Frequently Asked Question
- Asking a question easily answered by a cursory doc search
- Asking for emailed answers
- Beware of saying "doesn't work"
- Sending a "stealth" Cc copy
Be extra cautious when you get upset
- Count to ten before composing a followup when you are upset
- Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------
Posting Guidelines for comp.lang.perl.misc ($Revision: 1.4 $)
This newsgroup, commonly called clpmisc, is a technical newsgroup
intended to be used for discussion of Perl related issues (except job
postings), whether it be comments or questions.
As you would expect, clpmisc discussions are usually very technical in
nature and there are conventions for conduct in technical newsgroups
going somewhat beyond those in non-technical newsgroups.
This article describes things that you should, and should not, do to
increase your chances of getting an answer to your Perl question. It is
available in POD, HTML and plain text formats at:
http://mail.augustmail.com/~tadmc/clpmisc.shtml
For more information about netiquette in general, see the "Netiquette
Guidelines" at:
http://andrew2.andrew.cmu.edu/rfc/rfc1855.html
A note to newsgroup "regulars":
Do not use these guidelines as a "license to flame" or other
meanness. It is possible that a poster is unaware of things
discussed here. Give them the benefit of the doubt, and just
help them learn how to post, rather than assume
A note about technical terms used here:
In this document, we use words like "must" and "should" as
they're used in technical conversation (such as you will
encounter in this newsgroup). When we say that you *must* do
something, we mean that if you don't do that something, then
it's unlikely that you will benefit much from this group.
We're not bossing you around; we're making the point without
lots of words.
Do *NOT* send email to the maintainer of these guidelines. It will be
discarded unread. The guidelines belong to the newsgroup so all
discussion should appear in the newsgroup. I am just the secretary that
writes down the consensus of the group.
Before posting to comp.lang.perl.misc
Must
This section describes things that you *must* do before posting to
clpmisc, in order to maximize your chances of getting meaningful replies
to your inquiry and to avoid getting flamed for being lazy and trying to
have others do your work.
The perl distribution includes documentation that is copied to your hard
drive when you install perl. Also installed is a program for looking
things up in that (and other) documentation named 'perldoc'.
You should either find out where the docs got installed on your system,
or use perldoc to find them for you. Type "perldoc perldoc" to learn how
to use perldoc itself. Type "perldoc perl" to start reading Perl's
standard documentation.
Check the Perl Frequently Asked Questions (FAQ)
Checking the FAQ before posting is required in Big 8 newsgroups in
general, there is nothing clpmisc-specific about this requirement.
You are expected to do this in nearly all newsgroups.
You can use the "-q" switch with perldoc to do a word search of the
questions in the Perl FAQs.
Check the other standard Perl docs (*.pod)
The perl distribution comes with much more documentation than is
available for most other newsgroups, so in clpmisc you should also
see if you can find an answer in the other (non-FAQ) standard docs
before posting.
It is *not* required, or even expected, that you actually *read* all of
Perl's standard docs, only that you spend a few minutes searching them
before posting.
Try doing a word-search in the standard docs for some words/phrases
taken from your problem statement or from your very carefully worded
"Subject:" header.
Really Really Should
This section describes things that you *really should* do before posting
to clpmisc.
Lurk for a while before posting
This is very important and expected in all newsgroups. Lurking means
to monitor a newsgroup for a period to become familiar with local
customs. Each newsgroup has specific customs and rituals. Knowing
these before you participate will help avoid embarrassing social
situations. Consider yourself to be a foreigner at first!
Search a Usenet archive
There are tens of thousands of Perl programmers. It is very likely
that your question has already been asked (and answered). See if you
can find where it has already been answered.
One such searchable archive is:
http://groups.google.com/advanced_group_search
If You Like
This section describes things that you *can* do before posting to
clpmisc.
Check Other Resources
You may want to check in books or on web sites to see if you can
find the answer to your question.
But you need to consider the source of such information: there are a
lot of very poor Perl books and web sites, and several good ones
too, of course.
Posting to comp.lang.perl.misc
There can be 200 messages in clpmisc in a single day. Nobody is going to
read every article. They must decide somehow which articles they are
going to read, and which they will skip.
Your post is in competition with 199 other posts. You need to "win"
before a person who can help you will even read your question.
These sections describe how you can help keep your article from being
one of the "skipped" ones.
Is there a better place to ask your question?
Question should be about Perl, not about the application area
It can be difficult to separate out where your problem really is,
but you should make a conscious effort to post to the most
applicable newsgroup. That is, after all, where you are the most
likely to find the people who know how to answer your question.
Being able to "partition" a problem is an essential skill for
effectively troubleshooting programming problems. If you don't get
that right, you end up looking for answers in the wrong places.
It should be understood that you may not know that the root of your
problem is not Perl-related (the two most frequent ones are CGI and
Operating System related), so off-topic postings will happen from
time to time. Be gracious when someone helps you find a better place
to ask your question by pointing you to a more applicable newsgroup.
How to participate (post) in the clpmisc community
Carefully choose the contents of your Subject header
You have 40 precious characters of Subject to win out and be one of
the posts that gets read. Don't waste them. Take care while
composing them, they are the key that opens the door to getting an
answer.
Spend them indicating what aspect of Perl others will find if they
should decide to read your article.
Do not spend them indicating "experience level" (guru, newbie...).
Do not spend them pleading (please read, urgent, help!...).
Do not spend them on non-Subjects (Perl question, one-word
Subject...)
For more information on choosing a Subject see "Choosing Good
Subject Lines":
http://www.cpan.org/authors/id/D/DM/DMR/subjects.post
Part of the beauty of newsgroup dynamics, is that you can contribute
to the community with your very first post! If your choice of
Subject leads a fellow Perler to find the thread you are starting,
then even asking a question helps us all.
Use an effective followup style
When composing a followup, quote only enough text to establish the
context for the comments that you will add. Always indicate who
wrote the quoted material. Never quote an entire article. Never
quote a .signature (unless that is what you are commenting on).
Intersperse your comments *following* each section of quoted text to
which they relate. Unappreciated followup styles are referred to as
"Jeopardy" (because the answer comes before the question), or
"TOFU".
Reversing the chronology of the dialog makes it much harder to
understand (some folks won't even read it if written in that style).
For more information on quoting style, see:
http://web.presby.edu/~nnqadmin/nnq/nquote.html
Speak Perl rather than English, when possible
Perl is much more precise than natural language. Saying it in Perl
instead will avoid misunderstanding your question or problem.
Do not say: I have variable with "foo\tbar" in it.
Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
or I have $var = <DATA> (and show the data line).
Ask perl to help you
You can ask perl itself to help you find common programming mistakes
by doing two things: enable warnings (perldoc warnings) and enable
"strict"ures (perldoc strict).
You should not bother the hundreds/thousands of readers of the
newsgroup without first seeing if a machine can help you find your
problem. It is demeaning to be asked to do the work of a machine. It
will annoy the readers of your article.
You can look up any of the messages that perl might issue to find
out what the message means and how to resolve the potential mistake
(perldoc perldiag). If you would like perl to look them up for you,
you can put "use diagnostics;" near the top of your program.
Do not re-type Perl code
Use copy/paste or your editor's "import" function rather than
attempting to type in your code. If you make a typo you will get
followups about your typos instead of about the question you are
trying to get answered.
Provide enough information
If you do the things in this item, you will have an Extremely Good
chance of getting people to try and help you with your problem!
These features are a really big bonus toward your question winning
out over all of the other posts that you are competing with.
First make a short (less than 20-30 lines) and *complete* program
that illustrates the problem you are having. People should be able
to run your program by copy/pasting the code from your article. (You
will find that doing this step very often reveals your problem
directly. Leading to an answer much more quickly and reliably than
posting to Usenet.)
Describe *precisely* the input to your program. Also provide example
input data for your program. If you need to show file input, use the
__DATA__ token (perldata.pod) to provide the file contents inside of
your Perl program.
Show the output (including the verbatim text of any messages) of
your program.
Describe how you want the output to be different from what you are
getting.
If you have no idea at all of how to code up your situation, be sure
to at least describe the 2 things that you *do* know: input and
desired output.
Do not provide too much information
Do not just post your entire program for debugging. Most especially
do not post someone *else's* entire program.
Do not post binaries, HTML, or MIME
clpmisc is a text only newsgroup. If you have images or binaries
that explain your question, put them in a publically accessible
place (like a Web server) and provide a pointer to that location. If
you include code, cut and paste it directly in the message body.
Don't attach anything to the message. Don't post vcards or HTML.
Many people (and even some Usenet servers) will automatically filter
out such messages. Many people will not be able to easily read your
post. Plain text is something everyone can read.
Social faux pas to avoid
The first two below are symptoms of lots of FAQ asking here in clpmisc.
It happens so often that folks will assume that it is happening yet
again. If you have looked but not found, or found but didn't understand
the docs, say so in your article.
Asking a Frequently Asked Question
It should be understood that you may have missed the applicable FAQ
when you checked, which is not a big deal. But if the Frequently
Asked Question is worded similar to your question, folks will assume
that you did not look at all. Don't become indignant at pointers to
the FAQ, particularly if it solves your problem.
Asking a question easily answered by a cursory doc search
If folks think you have not even tried the obvious step of reading
the docs applicable to your problem, they are likely to become
annoyed.
If you are flamed for not checking when you *did* check, then just
shrug it off (and take the answer that you got).
Asking for emailed answers
Emailed answers benefit one person. Posted answers benefit the
entire community. If folks can take the time to answer your
question, then you can take the time to go get the answer in the
same place where you asked the question.
It is OK to ask for a *copy* of the answer to be emailed, but many
will ignore such requests anyway. If you munge your address, you
should never expect (or ask) to get email in response to a Usenet
post.
Ask the question here, get the answer here (maybe).
Beware of saying "doesn't work"
This is a "red flag" phrase. If you find yourself writing that,
pause and see if you can't describe what is not working without
saying "doesn't work". That is, describe how it is not what you
want.
Sending a "stealth" Cc copy
A "stealth Cc" is when you both email and post a reply without
indicating *in the body* that you are doing so.
Be extra cautious when you get upset
Count to ten before composing a followup when you are upset
This is recommended in all Usenet newsgroups. Here in clpmisc, most
flaming sub-threads are not about any feature of Perl at all! They
are most often for what was seen as a breach of netiquette. If you
have lurked for a bit, then you will know what is expected and won't
make such posts in the first place.
But if you get upset, wait a while before writing your followup. I
recommend waiting at least 30 minutes.
Count to ten after composing and before posting when you are upset
After you have written your followup, wait *another* 30 minutes
before committing yourself by posting it. You cannot take it back
once it has been said.
AUTHOR
Tad McClellan <tadmc@augustmail.com> and many others on the
comp.lang.perl.misc newsgroup.
------------------------------
Date: Fri, 24 Oct 2003 22:58:40 +1300
From: "Tintin" <me@privacy.net>
Subject: Re: rsh & perl -Directory creation not possible
Message-Id: <bnat60$v94hk$1@ID-172104.news.uni-berlin.de>
"qazmlp" <qazmlp1209@rediffmail.com> wrote in message
news:db9bbf31.0310210745.5c7c926b@posting.google.com...
> "Tintin" <me@privacy.net> wrote in message
news:<bn336u$r9k3k$1@ID-172104.news.uni-berlin.de>...
> > "qazmlp" <qazmlp1209@rediffmail.com> wrote in message
> > news:db9bbf31.0310210142.1b5acfed@posting.google.com...
> > > I have a perl script which creates a directory in the local machine.
> > > But, if I call this script from the remote machine using rsh, the
> > > directory is not created. And there is no error message reported. Why
> > > is that so ?
> > >
> > > What is the remedy for this ?
> >
> > Does your script have something like?
> >
> > mkdir '/path/to/dir' or die "Can not mkdir /path/to/dir $!\n";
> >
> > If not, why not?
>
> I have mkdir command in the script.
> When the rsh was executed with 'mkdir' directly, it worked and the
> directory was created. But, when the perl script(containing mkdir) was
> executed, it did not work.
You still haven't answered by previous question.
Post a relevant snippet of your code.
------------------------------
Date: 23 Oct 2003 15:49:49 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Simulating case sensitivity for win32 files
Message-Id: <3f985b0d@news.victoria.tc.ca>
Malcolm Dew-Jones (yf110@vtn1.victoria.tc.ca) wrote:
: M&M (mm-24@pobox.com) wrote:
: : or
: : perhaps retrieve a file's actual name?
So, did you try Win32::GetLongPathName yet?
------------------------------
Date: Fri, 24 Oct 2003 04:25:26 GMT
From: foo2@on-spammers2.com
Subject: Re: Taint - having some real trouble here, taint/perl experts, please help
Message-Id: <df35a431a5fc1da9c6c9f4e0d57b9732@news.teranews.com>
On Wed, 22 Oct 2003 16:39:16 -0500, tadmc@augustmail.com (Tad
McClellan) wrote:
>There is no pattern match in that code, so nothing can possibly
>become untainted.
>
>When you copy tainted data, the copy is tainted too.
Methinks you're not paying attention. That code simply ensures that
the user hasn't fed something evil into the one variable he didn't get
from menus. The untainting is done later (and quite effectively and
correctly, it seems to me, given that he really didn't want taint at
all and he thought it might be on.)
Walt
Software Engineer
Black Belt Systems
pages: http://www.blackbeltsystems.com/
email: http://www.blackbeltsystems.com/contact.html
------------------------------
Date: Fri, 24 Oct 2003 10:36:46 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: Taint - having some real trouble here, taint/perl experts, please help
Message-Id: <Pine.LNX.4.53.0310241028370.14101@ppepc56.ph.gla.ac.uk>
On Fri, 24 Oct 2003 foo2@on-spammers2.com wrote:
> On Wed, 22 Oct 2003 16:39:16 -0500, tadmc@augustmail.com (Tad
> McClellan) wrote:
>
> >There is no pattern match in that code, so nothing can possibly
> >become untainted.
> >
> >When you copy tainted data, the copy is tainted too.
>
> Methinks you're not paying attention.
Seems to me that your evaluation of Tad is erroneous.
> The untainting is done later (and quite effectively and
> correctly,
I'd rather say that the benefits of the taint check are wilfully
discarded at that point. "effectively" and "correctly" would not be
my terminology of choice for doing that, in the circumstances.
> it seems to me, given that he really didn't want taint at
> all and he thought it might be on.)
Well then, take away that "given". There's a right and a wrong way to
go about this, and I see no grounds for finding a string of excuses
for using the wrong way, when the right way could be simpler _and_
more transparent. And could well serve as a safety-harness to protect
the programmer from potential consequences of their own assumptions.
We still aren't really any nearer to locating the original problem,
but this kind of special pleading is not really getting us any closer,
if I may say so.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 5707
***************************************