[18748] in Perl-Users-Digest
Perl-Users Digest, Issue: 916 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 16 18:11:29 2001
Date: Wed, 16 May 2001 15:10:25 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <990051024-v10-i916@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 16 May 2001 Volume: 10 Number: 916
Today's topics:
mailing from perl <nulleq@swwfm.com>
Re: mailing from perl (John Joseph Trammell)
map only when defined? <prlawrence@lehigh.edu>
Re: map only when defined? <prlawrence@lehigh.edu>
Re: map only when defined? <uri@sysarch.com>
Re: map only when defined? (Randal L. Schwartz)
Re: Measuring the time (John Stanley)
Re: Measuring the time <godzilla@stomp.stomp.tokyo>
Re: Measuring the time <hartleh1@westat.com>
Re: Measuring the time (Randal L. Schwartz)
Re: Measuring the time nobull@mail.com
Re: Measuring the time <hillr@ugs.com>
Re: Measuring the time <godzilla@stomp.stomp.tokyo>
Re: Measuring the time (Randal L. Schwartz)
Re: Measuring the time (Tad McClellan)
Re: Measuring the time (Craig Berry)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 16 May 2001 20:43:30 GMT
From: Anonymous <nulleq@swwfm.com>
Subject: mailing from perl
Message-Id: <Pine.LNX.4.21.0105161531370.28726-100000@swwfm.com>
I'm working on a script that looks essentially like so, but doesn't work:
open(FH,"mailing.list");
while(<FH>) {
system("mail $_ < a_file_to_mail");
}
close FH;
any ideas?
Thanks,
chris
------------------------------
Date: Wed, 16 May 2001 20:59:38 GMT
From: trammell@bayazid.hypersloth.invalid (John Joseph Trammell)
Subject: Re: mailing from perl
Message-Id: <slrn9g5o5r.g3t.trammell@bayazid.hypersloth.net>
On Wed, 16 May 2001 20:43:30 GMT, Anonymous <nulleq@swwfm.com> wrote:
> I'm working on a script that looks essentially like so, but doesn't work:
>
> open(FH,"mailing.list");
>
> while(<FH>) {
> system("mail $_ < a_file_to_mail");
> }
>
> close FH;
>
> any ideas?
Maybe you need to chomp() before you call system().
--
and how does it feel like/to let forever be
------------------------------
Date: Wed, 16 May 2001 16:14:53 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: map only when defined?
Message-Id: <9dunal$56u@fidoii.CC.Lehigh.EDU>
Hello,
I'm currently saying:
my_function(
map {
(defined $args->{$_})
? ($_, $args->{$_})
: ''
}
qw/ -w -lpp -ms -o -s -c /
);
But this results in:
my_function('', '', '-ms', 'letter', '-o', 'portrait', '', '')
What I *really* want is:
my_function('-ms', 'letter', '-o', 'portrait')
Any ideas on what I might put in the map block that would accomplish
this? I tried:
my_function(
map {
(defined $args->{$_})
? ($_, $args->{$_})
: next()
}
qw/ -w -lpp -ms -o -s -c /
);
But next() applied itself to the block enclosing the my_function()
call...
Thanks,
Phil R Lawrence
------------------------------
Date: Wed, 16 May 2001 16:56:29 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: Re: map only when defined?
Message-Id: <9dupoo$ege@fidoii.CC.Lehigh.EDU>
I wrote:
...
> But this results in:
> ... ('', '', '-ms', 'letter', '-o', 'portrait', '', '')
>
> What I *really* want is:
> ... ('-ms', 'letter', '-o', 'portrait')
...
Here's a cleaner, complete test:
#!/usr/local/bin/perl -w
use diagnostics;
use strict;
my $args =
{
-ms => 'letter',
-o => 'portrait'
};
print join ' | ' =>
map {
(defined $args->{$_})
? ($_, $args->{$_})
: ''
}
qw/ -w -lpp -ms -o -s -c /,
' | ';
Thanks!
Phil
------------------------------
Date: Wed, 16 May 2001 21:40:30 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: map only when defined?
Message-Id: <x7lmnx7z1t.fsf@home.sysarch.com>
>>>>> "PRL" == Phil R Lawrence <prlawrence@lehigh.edu> writes:
PRL> print join ' | ' =>
PRL> map {
PRL> (defined $args->{$_})
PRL> ? ($_, $args->{$_})
PRL> : ''
make that () instead of ''.
you are passing back a null string instead of the empty list.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info: http://www.sysarch.com/perl/OOP_class.html
------------------------------
Date: 16 May 2001 14:43:04 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: map only when defined?
Message-Id: <m1n18das2f.fsf@halfdome.holdit.com>
>>>>> "Phil" == Phil R Lawrence <prlawrence@lehigh.edu> writes:
Phil> print join ' | ' =>
Phil> map {
Phil> (defined $args->{$_})
Phil> ? ($_, $args->{$_})
Phil> : ''
change that to () not ''
Phil> }
Phil> qw/ -w -lpp -ms -o -s -c /,
Phil> ' | ';
--
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: 16 May 2001 18:07:00 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Measuring the time
Message-Id: <9dufk4$3vf$1@news.orst.edu>
In article <u9pud9y84r.fsf@wcl-l.bham.ac.uk>, <nobull@mail.com> wrote:
>[1] As a reaction to the band of assholes who seem intent on
>disrupting any attempt to produce clear and concise posting guidelines
>to help people like Karol, I have now changed "You are expected to" to
>"You must" in my standard RTFFAQ response.
I'm sorry you see the suggestion to change one word from 'must' to
'should' or 'are expected to' as trying to disrupt any attempt at doing
anything. I assure you, this 'attempt' is entirely within your own mind.
>Of course when I say "you must" I really mean "in order not to make
>yourself appear selfish you must".
So your use of the word 'must' is not the same as what everyone else is
claiming it means in this context. Do you see now why using a word that
apparently nobody has the same meaning for might be a bad thing to do?
------------------------------
Date: Wed, 16 May 2001 11:09:13 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Measuring the time
Message-Id: <3B02C249.554733@stomp.stomp.tokyo>
Craig Berry wrote:
> Godzilla! wrote:
(unnoted snippage by Berry, context deliberately changed)
> : Would you like those of us who voice an opinion
> : different than yours, to stitch a Star Of David
> : upon our clothing in a clearly visible place?
> I need a ruling from the refs...does this constitute a Hitler/Nazi
> reference? If so, I invoke the Usenet conversational protocol clause
> stating that, once Hitler or Nazis are invoked in a (non-history-related)
> discussion, that discussion can be reasonably assumed to have permanently
> left the realm of rational debate.
Your logic is significantly less than adequate, Mr. Berry.
This type of rationale is not in keeping with expected
intellectual discourse. This rationale of yours also
indicates you are not as keen on history as you should be.
There is a very clear and distinct analogy between his
words and Germany's treatment of Jews way back when;
his words almost perfectly reflect the political
philosophy and rationale of Hitler, pertaining
to those of Jewish ancestry.
My opinion is those who invoke this dubious principle
of yours, as a cross-the-board response to all historical
references are sorely lacking in subtle associative thinking.
In my homestate of Oklahoma, there exists an old law
which states in a paraphrased manner,
"Fishing for whales is illegal."
Next I visit there, I shall take care while fishing to not
present an appearance of fishing for whales. There is
a good chance a person exhibiting your type of rationale
will invoke this dubious law and file criminal charges.
Clearly a wiser choice for me would be to engage
in frog gigging rather than fishing.
I am somewhat dismayed you have no objection to his
referring to many here as a "...band of assholes...."
Godzilla!
------------------------------
Date: Wed, 16 May 2001 14:16:10 -0400
From: Henry Hartley <hartleh1@westat.com>
Subject: Re: Measuring the time
Message-Id: <3B02C3EA.37F01749@westat.com>
Craig Berry wrote:
>
> Godzilla! (godzilla@stomp.stomp.tokyo) wrote:
> : Would you like those of us who voice an opinion
> : different than yours, to stitch a Star Of David
> : upon our clothing in a clearly visible place?
>
> I need a ruling from the refs...does this constitute a Hitler/Nazi
> reference? If so, I invoke the Usenet conversational protocol clause
> stating that, once Hitler or Nazis are invoked in a (non-history-related)
> discussion, that discussion can be reasonably assumed to have permanently
> left the realm of rational debate.
From the Dilbert Newsletter 33.0:
Lately I have found myself in e-mail discussions with Induhviduals
who employ debating tactics that are very similar. I suspect they
are learning these methods in some sort of top-secret Induhvidual
training facility.
The Induhvidual debating technique involves four steps:
1. Exaggerate your opponent's statement into an absurd absolute.
2. Make an inappropriate analogy.
3. Change the topic to something easier to defend.
4. Claim victory.
For example:
Me: Vegetables are good for you.
Induhvidual: That's ridiculous. If you ate a truckload of
vegetables all at once you would die.
Me: No one eats a truckload all at once.
Induhvidual: Let me give you an analogy. If you tried to swim
across the ocean, and you didn't know how to swim,
and you had no arms or legs, you'd never make it.
Surely you can agree with that.
Me: Um...that's different.
Induhvidual: Ha! So now you agree with me that swimming is good
exercise!
The worst part is that not only will you be frustrated at your
inability to make your point, you will be branded as the person who
thinks swimming is bad exercise.
--
Henry Hartley
------------------------------
Date: 16 May 2001 11:35:25 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Measuring the time
Message-Id: <m11yppf8gi.fsf@halfdome.holdit.com>
>>>>> "Henry" == Henry Hartley <hartleh1@westat.com> writes:
Henry> The Induhvidual debating technique involves four steps:
Henry> 1. Exaggerate your opponent's statement into an absurd absolute.
Henry> 2. Make an inappropriate analogy.
Henry> 3. Change the topic to something easier to defend.
Henry> 4. Claim victory.
I believe that was the strategy of the Prosecutor's closing arguments
in my criminal trial. {grin}
(See http://www.lightlink.com/fors/ for actual details.)
--
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: 16 May 2001 19:55:04 +0100
From: nobull@mail.com
Subject: Re: Measuring the time
Message-Id: <u9u22lunsn.fsf@wcl-l.bham.ac.uk>
stanley@skyking.OCE.ORST.EDU (John Stanley) writes:
> In article <u9pud9y84r.fsf@wcl-l.bham.ac.uk>, <nobull@mail.com> wrote:
>
> >Of course when I say "you must" I really mean "in order not to make
> >yourself appear selfish you must".
>
> So your use of the word 'must' is not the same as what everyone else is
> claiming it means in this context.
No. I deny that.
The unqualified use of the word "must" in an instruction like this[1]
means that that failure to follow an in instruction will have
consequences that are sufficiently strongly negative that a resonable
person would not want them and that the consequences are at least in
broad terms sufficiently obvious from context that to spell them out
would be at best redundant and at worst patronising.
I do not think have seen person put forward a viable definition of the
word "must" that conflicts with the above definition.
> Do you see now why using a word that apparently nobody has the same
> meaning for might be a bad thing to do?
Which also, unfortunately rules out all the concise alteratives
("should", "are expected to" etc). Non-concise alteratives are not an
option as a they will make the document sound too legalistic - which
is even more intimidating.
[1] This meaning obviously does not apply in "We must meet for lunch soon."
Please see the listing for "must"http://dictionary.cambridge.org/
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 16 May 2001 12:09:27 -0700
From: Ron Hill <hillr@ugs.com>
Subject: Re: Measuring the time
Message-Id: <3B02D067.F452D877@ugs.com>
"Randal L. Schwartz" wrote:
[snipped]
>
> I believe that was the strategy of the Prosecutor's closing arguments
> in my criminal trial. {grin}
>
> (See http://www.lightlink.com/fors/ for actual details.)
>
Wow this is the first I have heard of something like this. I did notice
something very odd. reading the report from P. Lazenby it mentions:
Detective Lilley execute the warrant and advised both the Schwartz
brothers of their Miranda rights.
However there is no mention of your lawyer being present, if this is the
case, why not?
Ron
------------------------------
Date: Wed, 16 May 2001 12:21:13 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Measuring the time
Message-Id: <3B02D329.AB6ABEF5@stomp.stomp.tokyo>
nobull@mail.com wrote:
> John Stanley wrote:
> > nobull@mail.com wrote:
(snipped idiotic bickering over semantics which numerous people are doing)
> Which also, unfortunately rules out all the concise alteratives
> ("should", "are expected to" etc). Non-concise alteratives are not an
> option as a they will make the document sound too legalistic - which
> is even more intimidating.
> [1] This meaning obviously does not apply in "We must meet for lunch soon."
> Please see the listing for "must"http://dictionary.cambridge.org/
This is incorrect. Within this context this presents
a social imperative meaning there is no choice, to which
all parties are presumed to consent with inferred enjoyment.
Godzilla!
------------------------------
Date: 16 May 2001 12:30:37 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Measuring the time
Message-Id: <m14ruldrc2.fsf@halfdome.holdit.com>
>>>>> "Ron" == Ron Hill <hillr@ugs.com> writes:
Ron> "Randal L. Schwartz" wrote:
Ron> [snipped]
>>
>> I believe that was the strategy of the Prosecutor's closing arguments
>> in my criminal trial. {grin}
>>
>> (See http://www.lightlink.com/fors/ for actual details.)
>>
Ron> Wow this is the first I have heard of something like this. I did notice
Ron> something very odd. reading the report from P. Lazenby it mentions:
Ron> Detective Lilley execute the warrant and advised both the Schwartz
Ron> brothers of their Miranda rights.
Ron> However there is no mention of your lawyer being present, if this is the
Ron> case, why not?
Because he wasn't.
If you want to discuss this, please visit
http://groups.yahoo.com/group/fors-discuss/ and join the group. It's not
appropriate to talk about it here. You might also want to join
http://groups.yahoo.com/group/fors-announce/ if you want occasional
significant updates to the ongoing case.
--
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: Wed, 16 May 2001 14:40:02 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Measuring the time
Message-Id: <slrn9g5ic1.nqi.tadmc@tadmc26.august.net>
John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
>In article <u9pud9y84r.fsf@wcl-l.bham.ac.uk>, <nobull@mail.com> wrote:
>>I have now changed "You are expected to" to
>>"You must" in my standard RTFFAQ response.
>
>I'm sorry you see the suggestion to change one word from 'must' to
>'should' or 'are expected to' as trying to disrupt any attempt at doing
>anything. I assure you, this 'attempt' is entirely within your own mind.
>
>>Of course when I say "you must" I really mean "in order not to make
>>yourself appear selfish you must".
>
>So your use of the word 'must' is not the same as what everyone else is
>claiming it means in this context.
^^^^^^^^^^^^^^^
Aha! I see the solution!
I will change the context :-)
I had seen John's point. I have also (finally) seen more than one
objection to the "must", which had been lacking until very recently.
So now there's enough "consensus" that I need to address it...
"must" in the context of "you must do this to post here" clearly
makes no sense. This newsgroup has already been created and is
unmoderated, so no such declaration is even possible.
I did not intend it to be taken as "you must do this to post here"
kind of thing, though I can see that the doc doesn't say that anywhere.
So rev 1.2 will say that :-)
But that would be a negative statement... so it won't say that.
It will instead contain a statement about what it _is_ rather
than about what it isn't.
I don't have time right now to work it up. You'll all just have
to wait until rev 1.2 is posted (likely late next week), to
give further input on the "must" thing.
The addition will be some form of "to avoid being widely ignored you must...".
Though I hope to discover a more PC way of stating it.
Perhaps even mentioning that you can skip reading the thing if
you don't mind being socially ostracized.
Perhaps also saying explicity that these are not "what you must do
to post here".
I urge patience. See what the next rev looks like.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 16 May 2001 21:31:04 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Measuring the time
Message-Id: <tg5sco4v5vlr21@corp.supernews.com>
Godzilla! (godzilla@stomp.stomp.tokyo) wrote:
: I am somewhat dismayed you have no objection to his
: referring to many here as a "...band of assholes...."
I didn't like it, but I also didn't get upset enough to warrant a public
or private response. The rhetorical device of using comparisons with the
annihilation of six million human beings comprising an entire culture to
make points about niceties of usenet etiquette is vastly more
objectionable.
On the topic of the proposed 'guidelines', I don't really understand why
discussion continues here. Any group or individual can post something
labeled 'clpm posting guidelines', asserting any rules and using any
language they please. We could have a thousand competing guidelines
without harm. Which are the 'true' guidelines? Those which lead to the
most effective operation of the group. See Borges' "The Library of Babel"
for a reductio ad absurdem on this topic.
--
| Craig Berry - http://www.cinenet.net/~cberry/
--*-- "God becomes as we are that we may be as he is."
| - William Blake
------------------------------
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 916
**************************************