[17578] in Perl-Users-Digest
Perl-Users Digest, Issue: 4998 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 30 11:15:34 2000
Date: Thu, 30 Nov 2000 08:15:18 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <975600918-v9-i4998@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 30 Nov 2000 Volume: 9 Number: 4998
Today's topics:
Re: Why? (Csaba Raduly)
Re: Why? (Anno Siegel)
Re: Why? <mjcarman@home.com>
Re: Why? (Anno Siegel)
Re: Why? <bart.lateur@skynet.be>
Re: Why? (Tad McClellan)
Re: Why? (Tad McClellan)
Re: Why? <hbarta@enteract.com>
Wich module for download via http ? <avril@ece.fr>
Re: Wich module for download via http ? (Rafael Garcia-Suarez)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 30 Nov 2000 11:25:27 +0000 (UTC)
From: real.email@signature.this.is.invalid (Csaba Raduly)
Subject: Re: Why?
Message-Id: <Xns8FFC740A9quuxi@194.203.134.135>
A million monkeys weren't enough! It took "Ed Grosvenor"
<secursrver@hotmail.com> on 30 Nov 2000 to produce
<gaqV5.18067$II2.1788036@newsread2.prod.itd.earthlink.net>:
>I have an idea. For those of you who insist on tearing someone a
>new orifice whenever they fail to read the Perl docs, why don't you
>print up a copy of the Perl docs and publish a phone number that
>these poor newbies can call to get a copy.
>
[snip]
What's wrong with www.ora.com ?
--
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:csaba.raduly@sophos.com http://www.sophos.com/
US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
... you'll be the first against -Wall -W -pedantic
------------------------------
Date: 30 Nov 2000 12:00:35 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Why?
Message-Id: <905fh3$nr0$1@lublin.zrz.tu-berlin.de>
John Boy Walton <johngros@Spam.bigpond.net.au> wrote in comp.lang.perl.misc:
>Maybe I should confess I read it here. Someone had posted how to read all
>the files in a directory in response to someones query. I pinched it and
>modified it to suit my needs. I just opened my file badly. Thank you
>Go-Back.
>
>"Roman Stawski" <roman.stawski@fr.adp.com> wrote in message
>news:3A26169D.3D52E1F8@fr.adp.com...
[etc]
Please learn to place your reply after the quoted material you are
commenting on. What the hell is "it" in "I read it here" referring
to? This is no way to have a dialog.
Anno
------------------------------
Date: Wed, 29 Nov 2000 08:04:24 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: Why?
Message-Id: <3A250CE8.96A0A614@home.com>
John Boy Walton wrote:
>
> The following script wiped the contents of the file.
> I don't know why, as I understand it the print statement should go to
> <STDOUT> not <BOGUS>.
>
> #!E:/Millenium Programs/perl/bin/Perl -w
> $path = "C:/Program Files/G6FTP/";
> $file = $path."Users.ini";
> open BOGUS,"$file";
Why aren't you checking the return value here?
open(BOGUS, $file) or die "Can't open '$file' [$!]\n";
> while ( defined( $line = <BOGUS> ) )
> {
> print $line;
> }
Did you copy & paste this snippet or retype it?
use PSI::ESP;
My crystal ball says that this is retyped, that in your real program you
open the file in write mode, and that's what's clobbering your file.
-mjc
------------------------------
Date: 30 Nov 2000 13:38:14 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Why?
Message-Id: <905l86$nv9$1@lublin.zrz.tu-berlin.de>
Ed Grosvenor <secursrver@hotmail.com> wrote in comp.lang.perl.misc:
>I have an idea. For those of you who insist on tearing someone a new
>orifice whenever they fail to read the Perl docs, why don't you print up a
>copy of the Perl docs and publish a phone number that these poor newbies can
>call to get a copy.
If this suggestion is a joke, I don't get it. If you're serious, I don't
get it either.
>First of all, yes, it's all in the documentation, but when it comes down to
>it, those docs are not only convoluted and difficult for some to read, but
>they're also about as exciting as your great grandmother's denture story
>every Thanksgiving.
So? Reading a manual is work, not fun. Unlike grannies denture story,
it's expected to teach you something useful.
> Secondly, I'm pretty sure that in all of the hundreds
>of thousands of pages that make up the Perl documentation (official and
>unofficial) every one of the questions posted here could be adequetly
>answered using the "docs". However, I believe that a good portion of users
>of this newsgroup find it easier and more productive to shoot out a quick
>question here than pour over hundreds of pages looking for that specific
>answer.
Easier? Sure. More productive? No. Poring over man-pages looking for
a specific answer is a basic skill every programmer needs. Many basic
skills must be exercised tediously to develop; this one is no exception.
Some questions require an careful interpretation of a sentence or two
in the manual. Others perhaps require reading two or more places in
parallel. Sometimes it is less than trivial to find the place in the
documentation where a question is answered. These are questions which
can reasonably asked here, even though the answer can be said to be in
the docs.
The question at hand was (paraphrasing): Is it true that 'open F, ">$file"'
truncates $file? This question is answered in so many words in the
documentation of open(). It's trivially found and all in one place.
>So why don't we just all act in the spirit of sharing and, as a community,
>stop tearing each other down for asking the "documented" questions.
The spirit of sharing is hard to keep up when many come in the spirit
of grabbing and running. Oh, and I don't mean to single out the
original poster in this respect. He's no worse than others.
>Remember, there is no such thing as a stupid question.
Gah. That's one of Larry's quips, overstated to make a point. I'm
getting tired of seeing it quoted as gospel. Of course there are
stupid questions. Worse, there are questions whose answering makes
*you* look stupid.
Anno
------------------------------
Date: Thu, 30 Nov 2000 14:13:21 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Why?
Message-Id: <33oc2ts22smqi4bja8g5smf8ousifkn934@4ax.com>
Roman Stawski wrote:
>> Yes, but there is a case where you are not at the end of file,
>> and have not read a "line" (where "\n0" are the last 2 characters
>> in the file, or where a one-byte file contains "0").
>>
>> In that case, you read a "0". Uh oh! That is a false value.
>> You drop out of the loop without processing it.
>
>I tried to reproduce the "\n0" condition before responding to the
>OP. It still printed out though.
Newer Perls are patched for that. Perl 5.004 did really do that. It
makes sense that it does, because the string "0" is false. Now, whether
that makes sense...
--
Bart.
------------------------------
Date: Thu, 30 Nov 2000 09:23:16 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Why?
Message-Id: <slrn92comk.6ge.tadmc@magna.metronet.com>
Ed Grosvenor <secursrver@hotmail.com> wrote:
>I have an idea.
I have an idea.
How about devising something that _you_ can do to "fix" things
rather than trying to put the work off on someone else.
>For those of you who insist on tearing someone a new
>orifice whenever they fail to read the Perl docs, why don't you print up a
>copy of the Perl docs and publish a phone number that these poor newbies can
>call to get a copy.
For those of you who don't like seeing flames for failing to
read the docs, why don't you print up a copy of the Perl docs
and publish a phone number that these poor newbies can call
to get a copy.
If _you_ want it, then _you_ do it.
Bitching that "someone else" needs to do something isn't going
to go anywhere, because nobody is beholding to you. Getting
other people to do your bidding is a rather unrealistic
thing to expect.
(Unless you hire them :-)
>First of all, yes, it's all in the documentation, but when it comes down to
>it, those docs are not only convoluted and difficult for some to read,
That does not matter.
If you don't understand them, it is perfectly OK to ask about
them here.
What is not OK is never having even looked for them.
>but
>they're also about as exciting as your great grandmother's denture story
>every Thanksgiving.
Thank you for volunteering to repair Perl's standard docs.
We are awaiting your patches.
>Secondly, I'm pretty sure that in all of the hundreds
>of thousands of pages that make up the Perl documentation (official and
>unofficial) every one of the questions posted here could be adequetly
>answered using the "docs".
I doubt that.
A depressingly large number of them could be answered in less time
than it takes to type in a Usenet article though.
But a "large number" is not "every one".
>However, I believe that a good portion of users
>of this newsgroup find it easier and more productive to shoot out a quick
>question here than pour over hundreds of pages looking for that specific
>answer.
Yes, there are plenty of selfish people in the world, can't
contest that.
And they are NOT expected to pour over all of the docs.
They are expected to merely try and find it in the docs for
a few minutes before giving up and making a posting.
So, rather than spend 10 minutes of their time, they will ask
thousands of other people to look it up for them.
That is a "net loss" for the community (the bad kind of Laziness).
>So why don't we just all act in the spirit of sharing and, as a community,
>stop tearing each other down for asking the "documented" questions.
You are in the wrong newsgroup.
It is pretty universal in the Big 8 newsgroups that you cannot
post until after you have searched the appropriate FAQ(s).
There is a newsgroup just like you want though!
It has exactly what you propose!
Unsubscribe from comp.lang.perl.misc and all its bad attitude.
Instead, subscribe to alt.perl and have a love fest full of
Very Good Answers.
What you want already exists. Go on over there and see
how well it works.
>Remember, there is no such thing as a stupid question.
"Of course, some questions are too silly to answer."
-- "Programming Perl" 3e, page xxxi
>Only stupid
>attitudes.
Taking turns in line is not stupid. It is practical. Go observe
the alternative (alt.perl).
-----------------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...
<Larry> [snip] I view a programming language as a place to be
<Larry> explored, like Disneyland. You don't need to have a lot of preparation
<Larry> to explore a theme park. You do have to go along with the crowd
<Larry> control measures, though. In a sense, each ride has its own
<Larry> prerequisites--if you cut in line, you risk getting tossed out of the
<Larry> park.
<Larry>
<Larry> What we have here in this newsgroup is a failure in crowd control.
<Larry> Reading the FAQ is like staying in line--it's something you should
<Larry> learn in kindergarten. Usenet needs a better kindergarten.
-----------------------------------------------
>So stop with the docs.
That will never happen here. Go somewhere else, or create a
new newsgroup run as you would like.
Expecting thousands of other people to do as you want is subject
to insurmountable inertia. Much easier to create a new utopia.
You have hit one of the 3 "suicide sins" that earn you a
permanent killfile entry. So long.
>And get off his butt, will ya?
Who are you to come in here and tell everybody else how it should be?
We should acquiesce to you based on what? Your extensive
contributions to date? Or "just because"?
If you don't like it here, then don't come here.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 30 Nov 2000 09:26:51 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Why?
Message-Id: <slrn92cotb.6ge.tadmc@magna.metronet.com>
[ Jeopardectomy performed ]
Ed Grosvenor <secursrver@hotmail.com> wrote:
>Ren Maddox <ren.maddox@tivoli.com> wrote in message
>news:m3d7fe4gzd.fsf@dhcp11-177.support.tivoli.com...
>> "John Boy Walton" <johngros@Spam.bigpond.net.au> writes:
>>
>> > I just remembered when I first wrote the script I opened the file using
>open
>> > BOGUS,">$file";
>> > When I ran the script it gave me an error -> BOGUS only opened for
>output.
>> > Would this have wiped the contents?
>> > I already have the feeling yes, but would like confirmation.
>>
>> Consider it confirmed. It *will* do that.
>I have an idea. For those of you who insist on tearing someone a new
>orifice whenever they fail to read the Perl docs
What on Earth is your rant about being pointed to the docs
doing as a followup to a post that does not make any
mention of the docs whatsoever?
You are coming out of the Twilight Zone here.
Perhaps you meant to followup to some article where pointing
to the docs actually happened?
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 30 Nov 2000 15:33:19 GMT
From: Henry_Barta <hbarta@enteract.com>
Subject: Re: Why?
Message-Id: <905rvv$kkc$2@bob.news.rcn.net>
> Ed Grosvenor <secursrver@hotmail.com> wrote in comp.lang.perl.misc:
>>I have an idea. For those of you who insist on tearing someone a new
>>orifice whenever they fail to read the Perl docs, why don't you print up a
>>copy of the Perl docs and publish a phone number that these poor newbies can
>>call to get a copy.
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> If this suggestion is a joke, I don't get it. If you're serious, I don't
> get it either.
I don't think he's joking.
Neither do I care to see questions that could have been answered
by a minimal effort at researching the documents. Of course
what is easily found by another may be not so easily found by
me.
The best answers are the ones that include the location of the
answer, be it FAQ, man page or whatever. That way I know where
to look next time.
--
Hank Barta White Oak Software Inc.
hbarta@enteract.com Predictable Systems by Design.(tm)
Beautiful Sunny Winfield, Illinois
------------------------------
Date: Thu, 30 Nov 2000 16:12:17 +0100
From: "François" <avril@ece.fr>
Subject: Wich module for download via http ?
Message-Id: <905qoi$jf7$1@s1.read.news.oleane.net>
I want to use Perl to make a script that download a file from a web site.
How can I do that ?
Thanks
------------------------------
Date: Thu, 30 Nov 2000 15:41:01 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Wich module for download via http ?
Message-Id: <slrn92ct9s.ff9.rgarciasuarez@rafael.kazibao.net>
François wrote in comp.lang.perl.misc:
> I want to use Perl to make a script that download a file from a web site.
> How can I do that ?
Use the LWP suite of modules, available on CPAN in the libwww bundle.
The simplest is LWP::Simple. More sophisticated methods are implemented
by LWP::UserAgent.
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4998
**************************************