[25348] in Perl-Users-Digest
Perl-Users Digest, Issue: 7593 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 29 11:05:51 2004
Date: Wed, 29 Dec 2004 08:05:10 -0800 (PST)
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, 29 Dec 2004 Volume: 10 Number: 7593
Today's topics:
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <dseaman@no.such.host>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <bik.mido@tiscalinet.it>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Is zero even or odd? <hadrainc@earthlink.net>
Re: Line continuation in Perl <bik.mido@tiscalinet.it>
Passing value to another CGI. <sam.wun@authtec.com>
Q: how to recognize STDIN/STDOUT (Piotr Klaban)
Re: Using perl how do you write a script to copy a remo <spamtrap@dot-app.org>
Re: Why does this work? <noreply@gunnar.cc>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 29 Dec 2004 14:41:42 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <d9g5t0dcbv3f9g7u3hn142no3i8mrkkpve@4ax.com>
On Tue, 28 Dec 2004 22:16:07 -0000, "George Dishman"
<george@briar.demon.co.uk> wrote:
>The task at hand is to show whether the rule
>is valid or otherwise. Can you do that?
Otherwise? Accept your opinion? Crazy George is really crazy!
------------------------------
Date: Wed, 29 Dec 2004 14:44:05 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <ghg5t0d09ekfrvhb056msu23rqu1bhd97k@4ax.com>
On Tue, 28 Dec 2004 23:21:43 +0000 (UTC), Dave Seaman
<dseaman@no.such.host> wrote:
>On Tue, 28 Dec 2004 21:50:45 GMT, vonroach wrote:
>> On Tue, 28 Dec 2004 09:46:05 -0600, russotto@grace.speakeasy.net
>> (Matthew Russotto) wrote:
>
>>>>But 0^0 does exist and has nothing to do with limits.
>>>
>>>0^0 can be defined by convention, of course, as is 0 factorial.
>
>> No you can't go that route either.
>
>0 factorial is an empty product, and therefore equal to 1.
>0^0 is an empty product, and therefore equal to 1.
>The same argument also shows that empty sums are equal to 0.
No 0^0 is meaningless .
------------------------------
Date: Wed, 29 Dec 2004 14:48:57 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <hpg5t051388e80qetlmtf88ho7m6kogg5c@4ax.com>
On Tue, 28 Dec 2004 22:04:23 -0000, "George Dishman"
<george@briar.demon.co.uk> wrote:
>Not really, simply cooling a resistive material
>won't usually reduce the resistance to zero. The
>superconducting state is fundamentally different.
Ah, another subject where you are poorly informed.
------------------------------
Date: Wed, 29 Dec 2004 14:56:22 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <pvg5t0dpdv0meq2dqba39a0s0lcsha3ud6@4ax.com>
On Tue, 28 Dec 2004 22:13:54 -0000, "George Dishman"
<george@briar.demon.co.uk> wrote:
> 0 = k * 0
What a profound observation. How many years have you ben working on
this concept? I suppose k*k= k^2 will be next? Have you carefully
assured yourself that 1+1=2?
------------------------------
Date: Wed, 29 Dec 2004 15:00:14 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <nhh5t09okbkv175cnuhd4hn5a4k0q61g7d@4ax.com>
On Tue, 28 Dec 2004 17:08:26 -0600, John Fields
<jfields@austininstruments.com> wrote:
>Ah, but :-) the normal order of precedence dictates that the
>multiplication be performed first,
Parentheses and exponents are dealt with first.
------------------------------
Date: Wed, 29 Dec 2004 15:01:53 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <rlh5t0hand9n9t7lt66i2h34d6hk57anbf@4ax.com>
On Wed, 29 Dec 2004 01:06:32 +0100, Michael Mendelsohn
<invalid@msgid.michael.mendelsohn.de> wrote:
>So (k*0)/0 is not equal to k*(0/0), then?
>What a pity!
Both are meaningless and undefined.
------------------------------
Date: Wed, 29 Dec 2004 15:04:09 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <eph5t0ttnplttc9ofvb0lplkko2l5g9vul@4ax.com>
On Tue, 28 Dec 2004 19:41:23 -0600, John Fields
<jfields@austininstruments.com> wrote:
>Obviously, but no matter.
>
>Consider:
>
>If my point is that 0/0 = 1,
What a pity, you blunder on your very first point.
------------------------------
Date: Wed, 29 Dec 2004 15:05:49 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <vsh5t05i850ekpmtir9u9mtk001can17k3@4ax.com>
On Wed, 29 Dec 2004 03:06:04 +0100, Michael Mendelsohn
<invalid@msgid.michael.mendelsohn.de> wrote:
>No, that is circular reasoning:
>"If 0/0 = 1 the 0/0 must be equal to 1".
No it is crap with no evidence of any reasoning.
------------------------------
Date: Wed, 29 Dec 2004 15:07:12 +0000 (UTC)
From: Dave Seaman <dseaman@no.such.host>
Subject: Re: Is zero even or odd?
Message-Id: <cquh70$r7f$1@mailhub227.itcs.purdue.edu>
On Wed, 29 Dec 2004 14:44:05 GMT, vonroach wrote:
> On Tue, 28 Dec 2004 23:21:43 +0000 (UTC), Dave Seaman
><dseaman@no.such.host> wrote:
>>On Tue, 28 Dec 2004 21:50:45 GMT, vonroach wrote:
>>> On Tue, 28 Dec 2004 09:46:05 -0600, russotto@grace.speakeasy.net
>>> (Matthew Russotto) wrote:
>>
>>>>>But 0^0 does exist and has nothing to do with limits.
>>>>
>>>>0^0 can be defined by convention, of course, as is 0 factorial.
>>
>>> No you can't go that route either.
>>
>>0 factorial is an empty product, and therefore equal to 1.
>>0^0 is an empty product, and therefore equal to 1.
>>The same argument also shows that empty sums are equal to 0.
> No 0^0 is meaningless .
Your rants are meaningless, since you never include supporting arguments and
you never answer contrary arguments, even when documented with authoritative
references.
--
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
------------------------------
Date: Wed, 29 Dec 2004 15:09:51 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <s2i5t0tqmi6hquu67p58f9k87eh9l2933c@4ax.com>
On Tue, 28 Dec 2004 21:57:09 -0600, John Fields
<jfields@austininstruments.com> wrote:
>>does not allow you to conclude that 0/0 = 1.
>
>But _does_ allow me to conclude that any other number, no matter how
>small, and no matter what its sign will, when divided by itself, give
>a quotient of 1?
>
>OK, look at it this way:
No it allows you to conclude that it is meaningless.
------------------------------
Date: Wed, 29 Dec 2004 15:12:41 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <i7i5t01v5va5r0he288hu9qnh0q7puuhcu@4ax.com>
On Tue, 28 Dec 2004 22:12:09 -0600, John Fields
<jfields@austininstruments.com> wrote:
>And if those x's were zeroes when they were cancelled, that still
>results in a quotient of 1, so 0/0 = 1
Chuckle....0/0 is meaningless and you are wrong and bordering on
lunacy.
------------------------------
Date: Wed, 29 Dec 2004 15:20:16 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <bii5t0tu7kmb4b9jde1bkkvc9blre99so7@4ax.com>
On Wed, 29 Dec 2004 13:38:59 +0100, Michael Mendelsohn
<invalid@msgid.michael.mendelsohn.de> wrote:
>The point is that you can't cancel them when x may be 0, because
>division by 0 is undefined. However, in the lim x->0 case x approaches
>0, but never really equals zero, so the cancellation may be performed.
0/n where n=any number except 0 = 0. You seem to be trying to make
something hard out of a triviality.
------------------------------
Date: Wed, 29 Dec 2004 15:23:58 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <kti5t0l1jevmabjbfj3bshrq0mrqragbca@4ax.com>
On Wed, 29 Dec 2004 08:11:36 GMT, mmeron@cars3.uchicago.edu wrote:
>Mati Meron | "When you argue with a fool,
>meron@cars.uchicago.edu | chances are he is doing just the same"
But, but Mati, nobody is arguing with you.
------------------------------
Date: Wed, 29 Dec 2004 15:28:27 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <67j5t0huhai9lv3imbqdtnjkgq7e2dsh71@4ax.com>
On Tue, 28 Dec 2004 17:32:57 -0600, John Fields
<jfields@austininstruments.com> wrote:
>1/0 is a small number?
No it is meaningless gibberish.
------------------------------
Date: Wed, 29 Dec 2004 15:39:44 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <7cj5t05sc6tt7cu85i3hngmnga0da194qa@4ax.com>
On Wed, 29 Dec 2004 01:37:39 +0000 (UTC), George Cox
<george_coxanti@spambtinternet.com.invalid> wrote:
>> Then it seems to me like y gets pretty big when x gets pretty small!
>
>You're confused. If y = 1/x then y gets pretty big when x gets pretty
>small.
>
Confused is too mild a term. If y = 1/x. then y goes from1 to a very
small fraction as x increases from 1. If x decreases to small
fractions, then y increases. x=0 yields a meaningless result.
------------------------------
Date: Wed, 29 Dec 2004 15:43:11 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <51k5t0pl8h71rc5ehv8bhs09dbshsnc72t@4ax.com>
On Tue, 28 Dec 2004 19:53:07 -0600, John Fields
<jfields@austininstruments.com> wrote:
>Then what would be the proper way to write it, please?
>
There isn't one. Division by 0 is meaningless.
------------------------------
Date: Wed, 29 Dec 2004 15:46:12 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <c6k5t097k8qtmk9nq04mfld50kf0qn4qpj@4ax.com>
On Wed, 29 Dec 2004 02:58:46 +0000 (UTC), George Cox
<george_coxanti@spambtinternet.com.invalid> wrote:
>John Fields wrote:
>>
>> Then what would be the proper way to write it, please?
>
>Write what? That 1/x gets big as x gets small?
>
> 1/x -> +infinity as x -> +0
>
> 1/x -> -infinity as x -> -0.
Both are meaningless. Just crap piled higher and deeper as in Ph D.
------------------------------
Date: Wed, 29 Dec 2004 16:48:49 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Is zero even or odd?
Message-Id: <sjg5t09c2ejskle2n6o2307nbbu9de6n92@4ax.com>
On Tue, 28 Dec 2004 21:23:49 +0000, John Woodgate
<jmw@jmwa.demon.contraspam.yuk> wrote:
>But for me that is not the issue. I do not LIE on newsgroups - there is
>no point - but I do make mistakes; everyone does. I suggest that your
Wow! We started from the trollish "Re: Is zero even or odd?" and now
we're arriving to Lie (news)groups...
;-)
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Wed, 29 Dec 2004 15:52:23 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <djk5t0hq7837fuap966i0roptl0e4l6gri@4ax.com>
On Wed, 29 Dec 2004 00:15:07 +0100, David Kastrup <dak@gnu.org> wrote:
>vonroach <hadrainc@earthlink.net> writes:
>
>> On Tue, 28 Dec 2004 19:27:01 +0000 (UTC), Dave Seaman
>> <dseaman@no.such.host> wrote:
>>
>>>I take it you haven't been reading the thread, since I have given several
>>>mathematical arguments and provided references to support the conclusion
>>>that 0^0 = 1.
>>
>> None of which have been accepted.
>
>So you think the polynomial 2 x^2 + 3 x^1 + 4 x^0 is undefined at x=0 ?
yes
------------------------------
Date: Wed, 29 Dec 2004 15:59:03 GMT
From: vonroach <hadrainc@earthlink.net>
Subject: Re: Is zero even or odd?
Message-Id: <qtk5t0lnkn24vjkdapnn2cts67deg4asnp@4ax.com>
On Wed, 29 Dec 2004 01:24:38 +0000 (UTC), Dave Seaman
<dseaman@no.such.host> wrote:
>Besides, there is also the definition from algebra, in which x^n is
>defined whenever x is a member of a monoid M and n is a natural number.
>In particular, x^0 = e, the identity in M.
>
x^0 = 1 except when x=0 which doesn't exist.
------------------------------
Date: Wed, 29 Dec 2004 16:48:53 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Line continuation in Perl
Message-Id: <4ug5t0ho9j6sbrnoig7ninvp2f05803os0@4ax.com>
On 28 Dec 2004 20:29:45 GMT, Abigail <abigail@abigail.nl> wrote:
>No, I'm not exaggerating. I'm talking about a change that will effect
>almost *EVERY* line of code I write. And many lines will be effected
>multiple times.
But so will, for example the new semantics of sigils and tons of other
things. OTOH you will be able to modify the grammar the way you like
most, which is not that bad after all. (And I bet you will do, BTW!)
Recent developments suggest that most probably another very common
Perl idiom like C<< while (<>) >> will go away, and not to be
substituted by s/while/for/ as we had been thinking for quite a while.
>And the problem is, in many cases, putting whitespace there isn't
>even a compile error. It just quietly changes the meaning of your
>program.
>
>In Perl6:
>
> $var1 = cos (0) * 2; # Equals 1.
> $var2 = cos(0) * 2; # Equals 2.
You know, I'm on p6l (but I'm the last arrived there and I've not even
started becoming confident with Perl6's syntax) but I'm not sure about
this. I know that it would be indeed so for methods, but I'm not sure
about functions/subs.
It's hard to say anything definitive on it, though, since Larry is
still actively changing his mind on rather basilar stuff too.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Wed, 29 Dec 2004 23:45:26 +0800
From: sam <sam.wun@authtec.com>
Subject: Passing value to another CGI.
Message-Id: <cqul0g$afo$1@news.hgc.com.hk>
Paul Lalli wrote:
> "sam" <sam.wun@authtec.com> wrote in message
> news:cqu8ob$4m3$1@news.hgc.com.hk...
>
> An example of your code with the two major errors corrected works
> perfectly for me:
> #!/usr/bin/perl
> use strict;
> use warnings;
> use CGI;
> use CGI::Carp qw/fatalsToBrowser/;
> my $query = new CGI;
>
> print $query->header();
>
> if (!$query->param) {
> print $query->startform(-target=>'_new');
> # print "<table border width=100% >\n";
> #.....
>
> print $query->submit(but1);
> }
> elsif ($query->param(but1)) {
> print "param: ", $query->param(but1),"<br>\n";
> }
>
>
Hi, if I have another text field with the value of "bob" as shown below:
$query->textfield({name=>'Name', value=>"bob"});
how can I pass its value to another cgi when the button is pressed?
I have written a if..{} statement as shown below:
if ($query->param('Name')) {
# goes to form2.cgi with Name and its value "bob"
}
Thanks
Sam
> Paul Lalli
>
>
>
>>Thanks
>>Sam
>>
>
>
------------------------------
Date: Wed, 29 Dec 2004 15:41:48 +0100 (CET)
From: makler@man.torun.pl (Piotr Klaban)
Subject: Q: how to recognize STDIN/STDOUT
Message-Id: <slrnct5ghc.meq.makler@oryl.man.torun.pl>
Hi,
Does anyone know how to properly recorgnize STDIN/STDOUT
argument given to the perl module function?
I can not find the easy answer on the web and in docs.
Maybe someone can help me?
I have the following in my module (from CPAN) MIME::Fast (Fast/Part.xs):
184 void
185 g_mime_part_set_content(mime_part, svmixed)
186 MIME::Fast::Part mime_part
187 SV * svmixed
188 PREINIT:
189 char * data;
190 STRLEN len;
191 SV* svval;
192 GMimeStream *mime_stream = NULL;
193 GMimeDataWrapper *mime_data_wrapper = NULL;
194 svtype svvaltype;
195 CODE:
196 svval = svmixed;
197 if (SvROK(svmixed)) {
[...]
213 svval = SvRV(svmixed);
214 }
215 svvaltype = SvTYPE(svval);
216
217 if (svvaltype == SVt_PVGV) { // possible FILE * handle
218 PerlIO *pio;
219 FILE *fp;
220 int fd;
221
222 pio = IoIFP(sv_2io(svval));
[...]
242 } else if (svvaltype == SVt_PVMG) {
// possible STDIN/STDOU
243 int fd0 = (int)SvIV( svval );
244 int fd;
245
246 if (fd0 < 0 || (fd = dup(fd0)) == -1)
247 croak("MIME::Fast::Part::set_content: Can not
duplicate a FILE pointer");
248
249 mime_stream = g_mime_stream_fs_new(fd);
[...]
258 } else if (SvPOK(svval)) {
259 data = (char *)SvPV(svval, len);
260 g_mime_part_set_content(mime_part, data, len);
261 } else {
262 croak("mime_set_content: Unknown type: %d", (int)svvaltype);
263 }
The problem is in line 243 when the magic string is passed to the function
(e.g. in perl -wT mode any "my $string = '';" is tainted, and the taintness
is located into the magic.
It seems that I need something different to recognize e.g. \*STDIN.
Maybe someone can point me to the docs or example code.
Best regards,
--
Piotr Klaban
------------------------------
Date: Wed, 29 Dec 2004 10:41:58 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Using perl how do you write a script to copy a remote file into your own site
Message-Id: <Z5adnVXGrI_aTU_cRVn-gQ@adelphia.com>
ARGENTINA wrote:
> how do you write a script to copy a remote file into your
> own site.
How do I write it? With a text editor, of course. :-)
> In my situation want to copy a rss feed from
> http://remoteserver/news.xml for example.
What have you tried so far?
If you need to learn Perl, have a look at:
<http://learn.perl.org>
If you need to find out about Perl modules:
<http://www.cpan.org>
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Wed, 29 Dec 2004 15:04:26 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Why does this work?
Message-Id: <33fsbgF4028n7U1@individual.net>
Bart Lateur wrote:
> Joe Smith wrote:
>> Brian McCauley wrote:
>>> I would consider the behaviour described in this thread to be a
>>> (non-serious) bug in Perl
>>
>> It is not a bug. It is a feature that was deliberately added to
>> the language and is documented.
>
> You're missing the point.
>
> use strict; print -force
>
> prints:
>
> -force
No, he isn't.
http://groups-beta.google.com/group/comp.lang.perl.misc/msg/92a1b3cbd05fb1c4
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
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 7593
***************************************