[24998] in Perl-Users-Digest
Perl-Users Digest, Issue: 7248 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 14 14:17:01 2004
Date: Thu, 14 Oct 2004 11:15:19 -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 Thu, 14 Oct 2004 Volume: 10 Number: 7248
Today's topics:
Re: Top posting (was Re: Concatenating an array into on <shawn.corey@sympatico.ca>
Re: Top posting (was Re: Concatenating an array into on (Randal L. Schwartz)
Re: Top posting (was Re: Concatenating an array into on (Randal L. Schwartz)
Re: Top posting (was Re: Concatenating an array into on <sholden@flexal.cs.usyd.edu.au>
Re: Top posting (was Re: Concatenating an array into on <sholden@flexal.cs.usyd.edu.au>
Re: Top posting (was Re: Concatenating an array into on <tadmc@augustmail.com>
Re: Top posting (was Re: Concatenating an array into on <tadmc@augustmail.com>
Re: Top posting (was Re: Concatenating an array into on <shawn.corey@sympatico.ca>
Re: Top posting (was Re: Concatenating an array into on <flavell@ph.gla.ac.uk>
Re: Top posting (was Re: Concatenating an array into on <sbryce@scottbryce.com>
Re: Top posting (was Re: Concatenating an array into on <tadmc@augustmail.com>
Re: Top posting (was Re: Concatenating an array into on <spikeywan@bigfoot.com>
Re: Top posting (was Re: Concatenating an array into on <shawn.corey@sympatico.ca>
Re: Top posting (was Re: Concatenating an array into on <shawn.corey@sympatico.ca>
Re: Trying to force 32-bit in pack() <usenet@morrow.me.uk>
Unlink Question <scottshane@earthlink.net>
Re: Unlink Question <mritty@gmail.com>
Re: Using a variable size with the repetition quantifie (Philippe Aymer)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 14 Oct 2004 08:59:32 -0400
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <BJubd.26043$hk6.970336@news20.bellglobal.com>
Tad McClellan wrote:
> Please help me learn what you know by naming one or two
> Big 8 newsgroups where top-posting is preferred.
>
> Thank you.
Why are you limiting this to 8 when there are thousands of newsgroups
available? Eight is not statistically significant in this size of
population.
--- Shawn
------------------------------
Date: 14 Oct 2004 06:12:44 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <1097759900.a4h+BWMKF83kojK+8cjuzg@teranews>
>>>>> "Shawn" == Shawn Corey <shawn.corey@sympatico.ca> writes:
Shawn> Do whatever you like. Nobody owns a newsgroup. Those that don't like
Shawn> what you do can skip the message. Nobody is forcing them to read it!
True. Nobody is forcing anyone of us experts to answer a message. If
you want an answer that isn't "blind leading blind", however, you
should try to at least understand a bit of the culture here.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 14 Oct 2004 06:13:25 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <1097759901.XUqNtMqsesmicld+Ah0dfw@teranews>
>>>>> "Richard" == Richard S Beckett <spikeywan@bigfoot.com> writes:
Richard> In other newsgroups they much prefer people to top post.
Name one.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 14 Oct 2004 13:37:38 GMT
From: Sam Holden <sholden@flexal.cs.usyd.edu.au>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <slrncmt092.ng6.sholden@flexal.cs.usyd.edu.au>
On Thu, 14 Oct 2004 12:53:28 +0100,
Richard S Beckett <spikeywan@bigfoot.com> wrote:
>
> Similarly with top posting. Why keep jumping down the throat of newbies,
> insisting that they don't top post? They go to a different newsgroup, and
> get blasted for not top posting. Which is right? Will there ever be an
> answer to the question?
When in Rome do as the Romans do.
In this group top posting is frowned upon by a significant number of
the most helpful and knowledgable posters. They ask that you don't
top post, but it's usenet you can top post all you want and no
one can stop you. They can however, tell their software to automatically
hide your posts so they don't see them.
So really no one really cares if you decide to ignore the the
"way things are done in these parts". They'll just ignore you.
Most people consider it polite to inform new people about
actions which will, if they are repeated, cause possibly
unwanted harmful side effects - in this case a large chunk
of the most knowledgable posters not answering your questions.
But don't worry about it, just keep top posting and pretty soon
no one will be asking you not to anymore.
--
Sam Holden
------------------------------
Date: 14 Oct 2004 13:41:37 GMT
From: Sam Holden <sholden@flexal.cs.usyd.edu.au>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <slrncmt0gh.ng6.sholden@flexal.cs.usyd.edu.au>
On Thu, 14 Oct 2004 08:59:32 -0400,
Shawn Corey <shawn.corey@sympatico.ca> wrote:
> Tad McClellan wrote:
>> Please help me learn what you know by naming one or two
>> Big 8 newsgroups where top-posting is preferred.
>>
>> Thank you.
>
> Why are you limiting this to 8 when there are thousands of newsgroups
> available? Eight is not statistically significant in this size of
> population.
"Big 8" not 8.
comp.*
humanities.*
misc.*
news.*
rec.*
sci.*
soc.*
talk.*
--
Sam Holden
------------------------------
Date: Thu, 14 Oct 2004 08:28:11 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <slrncmsvnb.45d.tadmc@magna.augustmail.com>
Richard S Beckett <spikeywan@bigfoot.com> wrote:
[ attributions missing yet again. This hurts your credibility when
lecturing about netiquette...
]
> Top posting is good in some people's OPINION,
Please name a Big 8 discussion newsgroup where such an opinion is held.
I'd like to go see for myself.
> Why keep jumping down the throat of newbies,
> insisting that they don't top post?
So that people might read and answer their question rather
than ignoring their question.
> They go to a different newsgroup, and
> get blasted for not top posting.
We need an example of such a newsgroup.
I, for one, think you are making it up.
Prove me wrong.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 14 Oct 2004 08:36:57 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <slrncmt07p.45d.tadmc@magna.augustmail.com>
Shawn Corey <shawn.corey@sympatico.ca> wrote:
> Tad McClellan wrote:
>> Please help me learn what you know by naming one or two
>> Big 8 newsgroups where top-posting is preferred.
>>
>> Thank you.
>
> Why are you limiting this to 8 when there are thousands of newsgroups
> available?
http://www.newbie.net/tgos/newbie/newsgroups2.html
There _are_ thousands of newsgroups in the Big 8 Hierarchy. :-)
(I put the "Big 8" in there as I will not be convinced by an
example in the alt.* hierarchy.
)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 14 Oct 2004 10:33:50 -0400
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <Y5wbd.26079$hk6.981644@news20.bellglobal.com>
Randal L. Schwartz wrote:
> True. Nobody is forcing anyone of us experts to answer a message. If
> you want an answer that isn't "blind leading blind", however, you
> should try to at least understand a bit of the culture here.
>
Considering the number of answers that are simply "Read the
documentation," I don't expect the experts here to answer any question.
The arrogance of this response assumes that everyone _knows_ that
perldoc is on their system and they can find the appropriate document by
pure dumb luck as there is no good search mechanism in perldoc. And even
if it had one, finding good responses to any search requires finding the
magic words that trigger the response. Try it in Google, for ever good
response you get, you also get tens of thousands of responses of
irrelevant material.
Many of those responding forget what it is like to learn something new.
Remembering where to look for help can be forgotten when concentrating
on something new. Add to this the frustration no not getting an answer
right away leads to posts like "Help me, I'm a newbie!" Posters to this
group should have more tolerance to the desperation, frustration, and
feelings of being lost of those who don't yet know what they are doing.
Personally, I like top-posting as my newsreader displays the top of the
messages first, not the bottom. I can read their response without
plowing through material I have already read. If I have to read what was
before, I normally have to go back to the very beginning as the quotes
are limited and don't give a full understanding of the thread.
Top-posting is a convenience for me but I can understand people wanting
to do things differently and not complain about it.
--- Shawn
------------------------------
Date: Thu, 14 Oct 2004 15:57:44 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <Pine.LNX.4.61.0410141550100.18736@ppepc56.ph.gla.ac.uk>
A: certainly not!
On Thu, 14 Oct 2004, Tad McClellan wrote:
> (I put the "Big 8" in there as I will not be convinced by an
> example in the alt.* hierarchy.
Nah: if you want examples of inconsiderate and slovenly posting
style, the place to go is the hierarchy that starts with the dominant
vendor name.
But even there, there are FAQs recommending the usenet-traditional
snip-and-interleave style, and some people who follow that style.
all the best
(and for the others, of course, the killfile awaits)
Q: should I quote the entire previous discussion and put
my answer on top?
------------------------------
Date: Thu, 14 Oct 2004 09:06:52 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <10mt5ga41grplcb@corp.supernews.com>
Shawn Corey wrote:
> Considering the number of answers that are simply "Read the
> documentation," I don't expect the experts here to answer any question.
"Read the Docs" is a legitimate answer to a question. It is teaching a
man to fish.
> Personally, I like top-posting as my newsreader displays the top of the
> messages first, not the bottom. I can read their response without
> plowing through material I have already read.
And how do you know that there isn't more of the response farther down
the page? You have to read the whole post to find that out.
And if someone is responding to different parts of your post, as I am
doing here, how do you keep it all in context if it is all top posted?
------------------------------
Date: Thu, 14 Oct 2004 11:46:43 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <slrncmtbbj.4qv.tadmc@magna.augustmail.com>
Shawn Corey <shawn.corey@sympatico.ca> wrote:
> Personally, I like top-posting
So long then.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 14 Oct 2004 17:41:43 +0100
From: "Richard S Beckett" <spikeywan@bigfoot.com>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <ckmad9$7v9$1@newshost.mot.com>
"Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote
> Most people consider it polite to inform new people about
> actions which will, if they are repeated, cause possibly
> unwanted harmful side effects - in this case a large chunk
> of the most knowledgable posters not answering your questions.
If only!
I think you'll have to agree that being polite is a rare occurrence in this
ng!
When a newbie asks for help, by definition he's a newbie, and doesn't know a
lot of things that seem obvious to more seasoned hackers. So when the first
thing they do is jump down his throat for top posting, it gets my goat!
However, I've decided to reduce my stress levels, so the goat's free to a
good home.
R.
------------------------------
Date: Thu, 14 Oct 2004 13:36:53 -0400
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <ANybd.26180$hk6.1005071@news20.bellglobal.com>
Tad McClellan wrote:
>>Personally, I like top-posting
>
>
>
> So long then.
That's what I was saying all along: if you can't tolerate people being
people, don't read newsgroups.
--- Shawn
------------------------------
Date: Thu, 14 Oct 2004 13:42:38 -0400
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <ZSybd.26185$hk6.1005667@news20.bellglobal.com>
Scott Bryce wrote:
> And if someone is responding to different parts of your post, as I am
> doing here, how do you keep it all in context if it is all top posted?
>
I call it memory.
Scott Bryce wrote:
> And how do you know that there isn't more of the response farther down
> the page? You have to read the whole post to find that out.
There might be. I expect people to make their point first, then add
explanation. Posting to newsgroup is like writing for a newspaper: You
make your most important point first. If you don't, people will miss
your message.
--- Shawn
------------------------------
Date: Thu, 14 Oct 2004 17:59:19 +0100
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Trying to force 32-bit in pack()
Message-Id: <7sn242-8q4.ln1@osiris.mauzo.dyndns.org>
Quoth Joe Smith <Joe.Smith@inwap.com>:
> Brad Walton wrote:
>
> > I got it to work. After some research (emails), I found out it needed
> > little-endian 32 bit 'V'. Thanks again for your help. It is appreciated!
>
> In the case of a protocol that you've invented yourself, it does not make
> much difference when using V instead of N, as long as both ends agree
> and are the same endian-ness. But if you intend to talk to another
> machine that is not based the the x86 architecture, you need to use
> the network-byte-order (n and N).
No, both N and V are byte-order-independant (big- and little-endian
respectively). iIlL are the ones you need to watch when talking to
different architectures.
Of course, if you're designing your own protocol you should use N,
because it's the standard, but if you're following someone else's you
have no choice.
Ben
--
The cosmos, at best, is like a rubbish heap scattered at random.
- Heraclitus
ben@morrow.me.uk
------------------------------
Date: Thu, 14 Oct 2004 17:59:01 GMT
From: Scott Hoffman <scottshane@earthlink.net>
Subject: Unlink Question
Message-Id: <BD940C4A.1A04%scottshane@earthlink.net>
I am looking for a way to delete files and directories for a form button or
even a URL: tried this on but errors 500. Is what I want possible??? If so
please elaborate.. TIA
#!/usr/bin/perl
## SPECIFY THE PATH TO THE DIRECTORY
## NOTE: NO TRAILING SLASH "/"
$dir = "/Library/Webserver/Documents/unlink_text" ;
## OPEN AND READ THE DIRECTORY
opendir (DIR, "$dir/");
@FILES = grep(/.txt/,readdir(DIR));
closedir (DIR);
## DELETE THE .TXT FILES THAT ARE OLDER THAN 1 DAY
foreach $FILES (@FILES) {
if (-M "$dir/$FILES" > 1) {
unlink("$dir/$FILES");
}
}
HTML FORM action="../cgi_bin/unlink.cgi method="post"
------------------------------
Date: Thu, 14 Oct 2004 18:05:22 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Unlink Question
Message-Id: <Cdzbd.899$9f1.268@trndny05>
"Scott Hoffman" <scottshane@earthlink.net> wrote in message
news:BD940C4A.1A04%scottshane@earthlink.net...
> I am looking for a way to delete files and directories for a form
button or
> even a URL: tried this on but errors 500.
please read: perldoc -q 500
> Is what I want possible??? If so please elaborate.. TIA
Of course it is. Provided, of course, that you have the correct
permissions to delete files. And by 'you', in this case, I probably
mean "the application executing your CGI script."
> #!/usr/bin/perl
>
> ## SPECIFY THE PATH TO THE DIRECTORY
> ## NOTE: NO TRAILING SLASH "/"
>
> $dir = "/Library/Webserver/Documents/unlink_text" ;
>
> ## OPEN AND READ THE DIRECTORY
>
> opendir (DIR, "$dir/");
> @FILES = grep(/.txt/,readdir(DIR));
> closedir (DIR);
>
> ## DELETE THE .TXT FILES THAT ARE OLDER THAN 1 DAY
>
> foreach $FILES (@FILES) {
> if (-M "$dir/$FILES" > 1) {
> unlink("$dir/$FILES");
> }
> }
I'd think you can combine all this....
unlink ( grep { /.txt/ && -M "$dir/$_" > 1} readdir DIR);
If perldoc -q 500 doesn't help you figure out your problem, post a short
BUT COMPLETE script that illustrates your problem.
Paul Lalli
------------------------------
Date: 14 Oct 2004 10:59:25 -0700
From: aymerphilippe@hotmail.com (Philippe Aymer)
Subject: Re: Using a variable size with the repetition quantifier
Message-Id: <47971ff0.0410140959.46344c45@posting.google.com>
Hi guys,
My error, I didn't know the "." metachar was not available in
character class (ie "[]").
And yes, it seems that /s doesn't correctly propagate into
(regex)-runtime-interpolated strings as in:
/X(\d)(??{".{$1}"})/s
I don't know if this is by design or a bug.
Thanks again for your help. It was much appreciated!
Phil.
Ben Morrow <usenet@morrow.me.uk> wrote in message news:<74e042-n05.ln1@osiris.mauzo.dyndns.org>...
> Quoth aymerphilippe@hotmail.com (Philippe Aymer):
> > Jeff 'japhy' Pinyan <pinyaj@rpi.edu> wrote in message news:<Pine.SOL.3.96.1041012152434.11683A-100000@vcmr-86.server.rpi.edu>...
> > > On 12 Oct 2004, Philippe Aymer wrote:
> > >
> > > >Now, I still have a trouble. Because:
> > > >
> > > >/X(\d)((??{"\\w{$1}"}))/
> > > >
> > > >works, but in my string, I also have to match newline. So I did:
> > > >
> > > >/X(\d)(??{"\\w{$1}"})/s
> > > >
> > > >which doesn't work (seems to apply only to //, not things within
> > > >(?..)), then:
> > >
> > > The /s modifier only affects the '.' metacharacter. \w doesn't match \n.
> >
> > oups... I should have written:
> >
> > /X(\d)(??{".{$1}"})/s
> >
> > that's what I'm using ("xyz" in my example coule be anything, even non
> > printable char).
>
> Maybe /s doesn't correctly propagate into (regex)-runtime-interpolated
> strings (this is probably a bug in the regex engine, if it's true); try
>
> /X(\d)(??{"(?s).{$1}"})/s
>
> > > >/X(\d)(??{"[\\w\n]{$1}"})/
> > > >
> > > >which doesn't work neither... (?)
> > >
> > > This should work:
> > >
> > > /X(\d)((??{ "[\\w\\n]{$1}" }))/
> >
> > ok, I have trouble with my fingers... I'm using ".\\n", but no it's
> > not working.
>
> CUT AND PASTE CODE. NEVER RETYPE IT.
>
> > So I try this program:
> >
> > my $string = "DA3xyzB4ab\nc";
> >
> > print "==>$string<==" . "\n\n";
> >
> > if ($string =~ /
> > D
> > (
> > A
> > (\d)
> > (?{ print "===>$2<===\n"; })
> > ( (??{ "[\\w\\n]{$2}" }) )
>
> Again you have \w... please say what you mean.
>
> > (?{ print "===>$3<===\n"; })
> > )
> > (
> > B
> > (\d)
> > (?{ print "===>$5<===\n"; })
> > ( (??{ "[\\w\\n]{$5}" }) )
> > (?{ print "===>$6<===\n"; })
> > )
> > /xs) {
> > print "\n";
> > print "DATA : =>$1<= " . length($1) . "\n";
> > print "DATA : =>$4<= " . length($4) . "\n";
> > }
> >
> > The second pattern : "[.\\n]{$5}" doesn't work...
>
> What do you mean, it doesn't work? . is not a metachar inside character
> classes, so this matches $5 occurences of "." or "\n". You want
>
> "(?:.|\\n){$5}"
>
> or use (?s) as above.
>
> Ben
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 7248
***************************************