[26370] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8542 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 19 09:05:19 2005

Date: Wed, 19 Oct 2005 06: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           Wed, 19 Oct 2005     Volume: 10 Number: 8542

Today's topics:
    Re: Microsoft Hatred FAQ <my_email_is_posted_on_my_website@munged.invalid>
    Re: Microsoft Hatred FAQ <my_email_is_posted_on_my_website@munged.invalid>
    Re: Microsoft Hatred FAQ <davids@webmaster.com>
    Re: Microsoft Hatred FAQ <davids@webmaster.com>
    Re: Microsoft Hatred FAQ <apardon@forel.vub.ac.be>
    Re: Microsoft Hatred FAQ <rogblake10@iname10.com>
    Re: Microsoft Hatred FAQ <apardon@forel.vub.ac.be>
        Record Output From System() <speediercoREMOVE_THIS@yahoo.com>
    Re: where is my text file? <tac@tac.ouch.co.uk>
    Re: where is my text file? <ebohlman@omsdev.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 19 Oct 2005 10:08:43 GMT
From: Roedy Green <my_email_is_posted_on_my_website@munged.invalid>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <vm6cl19r7j3r6b4o73d5m3ab2bmih2v3j6@4ax.com>

On Wed, 19 Oct 2005 01:54:14 -0700, "David Schwartz"
<davids@webmaster.com> wrote or quoted :

>    They have obligations to their clients because (and only because) 
>failure to provide the services they contract to provide will result in 
>lawsuits and harm to the shareholders. All other obligations come from the 
>harm these failures will do to the shareholders. 

That's the view of Republican, but it is not the only view.  Some
might say the law trumps that. It does not matter if breaking the law
would be more profitable, you still don't do it.
-- 
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.


------------------------------

Date: Wed, 19 Oct 2005 10:09:49 GMT
From: Roedy Green <my_email_is_posted_on_my_website@munged.invalid>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <5q6cl1d5n3h0rpgts4i0ejdpunpdkg72e0@4ax.com>

On 19 Oct 2005 09:41:09 GMT, Antoon Pardon <apardon@forel.vub.ac.be>
wrote or quoted :

>As far as I understand you, the company should ship the faulty model.

This is what they do.  However, I find it odd people seriously
suggesting that is the way society SHOULD run.
-- 
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.


------------------------------

Date: Wed, 19 Oct 2005 03:15:03 -0700
From: "David Schwartz" <davids@webmaster.com>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <dj56ba$2oe$1@nntp.webmaster.com>


"Roedy Green" <my_email_is_posted_on_my_website@munged.invalid> wrote in 
message news:vm6cl19r7j3r6b4o73d5m3ab2bmih2v3j6@4ax.com...

> On Wed, 19 Oct 2005 01:54:14 -0700, "David Schwartz"
> <davids@webmaster.com> wrote or quoted :

>>    They have obligations to their clients because (and only because)
>>failure to provide the services they contract to provide will result in
>>lawsuits and harm to the shareholders. All other obligations come from the
>>harm these failures will do to the shareholders.

> That's the view of Republican, but it is not the only view.  Some
> might say the law trumps that. It does not matter if breaking the law
> would be more profitable, you still don't do it.

    Did I say their obligation was to secure their shareholders as much 
profit as possible? I said their obligation was to their shareholders.

    I am only continuing this off-topic thread on newsgroups that probably 
don't want it because it is a basic principle of fairness that a false or 
distorted comment deserves an rebuttal anywhere that false or distorted 
comment appears. However, it doesn't deserve a full debate anywhere except 
where it's on-topic.

    DS




------------------------------

Date: Wed, 19 Oct 2005 03:19:04 -0700
From: "David Schwartz" <davids@webmaster.com>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <dj56ir$2of$1@nntp.webmaster.com>


"Antoon Pardon" <apardon@forel.vub.ac.be> wrote in message 
news:slrndlc55k.9v5.apardon@rcpc42.vub.ac.be...

> A company figures out something is wrong with one of their new models.
> They have two options. They can repair the problem or they can leave
> it as is and brace the laswsuits that will likely follow. An analysis
> shows that the first option is likely to cost more than the second.
>
> As far as I understand you, the company should ship the faulty model.

    It is impossible to respond to this with anything shorter than many 
pages. Google for "prudent predator" if you want all sides to this question. 
The short answer is "maybe".

    To the people who think that you obviously shouldn't, ask them the 
following hypothetical: You have a million pounds of grain. Destroying it 
will probably cost at least ten lives due to starvation. The grain, however, 
is contaminated, and selling it will likely make ten people sick, of which 
three will probably die. Should you destroy the grain?

    You do have an obligation to the shareholders not to commit fraud in 
their name.

    DS




------------------------------

Date: 19 Oct 2005 11:11:27 GMT
From: Antoon Pardon <apardon@forel.vub.ac.be>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <slrndlcaev.1lo.apardon@rcpc42.vub.ac.be>

Op 2005-10-19, David Schwartz schreef <davids@webmaster.com>:
>
> "Antoon Pardon" <apardon@forel.vub.ac.be> wrote in message 
> news:slrndlc55k.9v5.apardon@rcpc42.vub.ac.be...
>
>> A company figures out something is wrong with one of their new models.
>> They have two options. They can repair the problem or they can leave
>> it as is and brace the laswsuits that will likely follow. An analysis
>> shows that the first option is likely to cost more than the second.
>>
>> As far as I understand you, the company should ship the faulty model.
>
>     It is impossible to respond to this with anything shorter than many 
> pages. Google for "prudent predator" if you want all sides to this question. 
> The short answer is "maybe".
>
>     To the people who think that you obviously shouldn't, ask them the 
> following hypothetical: You have a million pounds of grain. Destroying it 
> will probably cost at least ten lives due to starvation. The grain, however, 
> is contaminated, and selling it will likely make ten people sick, of which 
> three will probably die. Should you destroy the grain?

You could sell it, making it clear to those you sell it to that it is
contaminated grain and explaining what the risk are in consuming this grain.

>     You do have an obligation to the shareholders not to commit fraud in 
> their name.

Well then you can't ship the model unless you also make the problem
public. Because shipping the model while you know it has problems
is IMO fraud. Free trade IMO involves correct information about what
is traded.

-- 
Antoon Pardon


------------------------------

Date: Wed, 19 Oct 2005 12:25:25 GMT
From: Roger Blake <rogblake10@iname10.com>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <slrndlceph.7sc.rogblake10@moog.netaxs.com>

In article <slrndlc55k.9v5.apardon@rcpc42.vub.ac.be>, Antoon Pardon wrote:
> A company figures out something is wrong with one of their new models.
> They have two options. They can repair the problem or they can leave
> it as is and brace the laswsuits that will likely follow. An analysis
> shows that the first option is likely to cost more than the second.

What you are desribing is the Ford Pinto. (As you may recall, Ford
determined that it would cost less to settle the lawsuits of charbroiled
customers and their families than to fix the poor engineering of the
gas tank on that car.)

> As far as I understand you, the company should ship the faulty model.

That is what Ford did for years with the Pinto.

They failed to take into account that beyond the short-term profit
numbers, there is an effect on the company's reputation and profitibility
when shipping faulty products in a competitive marketplace. Today's
U.S. automakers are still suffering from poor reputations they earned
decades ago.

-- 
  Roger Blake
  (Subtract 10 for email.)


------------------------------

Date: 19 Oct 2005 12:58:30 GMT
From: Antoon Pardon <apardon@forel.vub.ac.be>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <slrndlcgnm.1lo.apardon@rcpc42.vub.ac.be>

Op 2005-10-19, Roger Blake schreef <rogblake10@iname10.com>:
> In article <slrndlc55k.9v5.apardon@rcpc42.vub.ac.be>, Antoon Pardon wrote:
>> A company figures out something is wrong with one of their new models.
>> They have two options. They can repair the problem or they can leave
>> it as is and brace the laswsuits that will likely follow. An analysis
>> shows that the first option is likely to cost more than the second.
>
> What you are desribing is the Ford Pinto. (As you may recall, Ford
> determined that it would cost less to settle the lawsuits of charbroiled
> customers and their families than to fix the poor engineering of the
> gas tank on that car.)
>
>> As far as I understand you, the company should ship the faulty model.
>
> That is what Ford did for years with the Pinto.

And as far as I understand David Schwartz that was the right decision
of Ford.

> They failed to take into account that beyond the short-term profit
> numbers, there is an effect on the company's reputation and profitibility
> when shipping faulty products in a competitive marketplace. Today's
> U.S. automakers are still suffering from poor reputations they earned
> decades ago.

But that is aftersight. If is always possible that you overlooked
something in your analisis or that some information is unavailable.
So you are forced to take a decision based on the information then
available. Whether or not the problem involves ethics in trading
doesn't change that.

-- 
Antoon Pardon


------------------------------

Date: Wed, 19 Oct 2005 06:44:29 -0400
From: "OttawaTrade" <speediercoREMOVE_THIS@yahoo.com>
Subject: Record Output From System()
Message-Id: <JcSdnYSOiqQLvsveRVn-og@rogers.com>

I need a perl script to call another script. I current use

system ("perl script2 ...");

However, I need to take the output of the script2 and do regexp on it.
Currently, it is just going to standout, and not returning to script1.

Is there a way to solve this?




------------------------------

Date: Wed, 19 Oct 2005 11:12:03 +0100
From: "code_wrong" <tac@tac.ouch.co.uk>
Subject: Re: where is my text file?
Message-Id: <43561be3$1_3@mk-nntp-2.news.uk.tiscali.com>


"Tintin" <tintin@invalid.invalid> wrote in message 
news:rfn5f.1402$S24.90630@news.xtra.co.nz...
>
> "code_wrong" <tac@tac.ouch.co.uk> wrote in message 
> news:43551b5c$1_3@mk-nntp-2.news.uk.tiscali.com...
>> hi,
>> I using the following script (from CGI and Perl in easy steps book) as a 
>> hit counter:
>
> Throw that book away.  The code example is simply woeful.  You will be 
> learning many, many bad habits if you follow the book.
>
> [horrible code snipped]

how so?

it does go on to demonstrate file locking and permissions ... although .. 
since my host is running Windows IIS  .... I am not sure if I can set file 
permissions 




------------------------------

Date: 19 Oct 2005 12:39:55 GMT
From: Eric Bohlman <ebohlman@omsdev.com>
Subject: Re: where is my text file?
Message-Id: <Xns96F44FC08CAA2ebohlmanomsdevcom@130.133.1.4>

"code_wrong" <tac@tac.ouch.co.uk> wrote in
news:43561be3$1_3@mk-nntp-2.news.uk.tiscali.com: 

> 
> "Tintin" <tintin@invalid.invalid> wrote in message 
> news:rfn5f.1402$S24.90630@news.xtra.co.nz...
>> Throw that book away.  The code example is simply woeful.  You will
>> be learning many, many bad habits if you follow the book.
>>
>> [horrible code snipped]
> 
> how so?
> 
> it does go on to demonstrate file locking and permissions ... although
> .. since my host is running Windows IIS  .... I am not sure if I can
> set file permissions 

> #!/usr/bin/perl

No "use warnings" (or -w).
No "use strict".

> open(COUNT,"counter.txt");

No check that the open succeeded.
Assumption that the file is in the script's current working directory; 
where that is is extremely server-dependent.

> $num = <COUNT>;

> close(COUNT);

> $num++;

Up to this point, another instance of this script could also have read 
the same value from the file.

> open(COUNT, ">counter.txt");

No check that the open succeeded.

At this point, the file is empty.  If another instance of the script 
comes along and tries to read it, its version of $num will be set to 
zero.

> print COUNT $num;
> close(COUNT);

In the first scenario I mentioned, the count will have only gone up by 
one even though there were two accesses because both instances started 
with the same value.  In the second scenario, the count will be reset to 
1 because the second instance read from an empty file.

> $num=sprintf("%05d", $num);

> print "content-type:text/html\n\n <html>";

You've advertised that you're sending out HTML.

> print "You are visitor number $num </html>";

But what you've sent out isn't HTML (there's no <title>).


------------------------------

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 8542
***************************************


home help back first fref pref prev next nref lref last post