[27824] in Perl-Users-Digest
Perl-Users Digest, Issue: 9188 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 21 18:05:53 2006
Date: Fri, 21 Apr 2006 15:05:07 -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 Fri, 21 Apr 2006 Volume: 10 Number: 9188
Today's topics:
Re: [OT] C interpreter <no@thanks.com>
Hebrew Calendar conversions? (Seymour J.)
Re: Hebrew Calendar conversions? <corff@zedat.fu-berlin.de>
Re: Hebrew Calendar conversions? <sherm@dot-app.org>
Re: Hebrew Calendar conversions? <mothra@nowhereatall.com>
Re: Posting Guidelines for comp.lang.perl.misc ($Revisi jgraber@ti.com
Re: Posting Guidelines for comp.lang.perl.misc ($Revisi <1usa@llenroc.ude.invalid>
Re: show hidden value in variable.. with mysql.. FIXED <tadmc@augustmail.com>
Re: Term::ReadKey on Win? 5.005 vs 5.8.8? <nospam-abuse@ilyaz.org>
Re: XS Progamming with Perl 6 <uri@stemsystems.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 21 Apr 2006 21:02:22 +0200
From: Asterbing <no@thanks.com>
Subject: Re: [OT] C interpreter
Message-Id: <MPG.1eb34aa89976479b989818@news.tiscali.fr>
In article <e2an9o.1ko.1@news.isolution.nl>, rvtol+news@isolution.nl
says...
> De-compilation is not always hard. But source code is another subject.
> You can easily modify a C-compiler such that it includes the source as
> an accessible resource in the executable.
>
When you decompile, you don't copy nor modify, but hack without the
author agreement.
------------------------------
Date: Fri, 21 Apr 2006 15:05:42 -0300
From: "Shmuel (Seymour J.) Metz" <spamtrap@library.lspace.org.invalid>
Subject: Hebrew Calendar conversions?
Message-Id: <44492d06$5$fuzhry+tra$mr2ice@news.patriot.net>
Is there a Perl module for Hebrew->Gegorian and Gregorian->Hebrew date
conversions?
--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org
------------------------------
Date: 21 Apr 2006 19:16:47 GMT
From: <corff@zedat.fu-berlin.de>
Subject: Re: Hebrew Calendar conversions?
Message-Id: <4aspcvFuaq0bU1@uni-berlin.de>
In comp.lang.perl.misc "Shmuel (Seymour J.) Metz" <spamtrap@library.lspace.org.invalid> wrote:
: Is there a Perl module for Hebrew->Gegorian and Gregorian->Hebrew date
: conversions?
Did you check CPAN by searching "Hebrew"? I saw numerous modules there,
also with reference to DateTime and Locale. No idea though whether they
offer your required function.
Oliver.
--
Dr. Oliver Corff e-mail: corff@zedat.fu-berlin.de
------------------------------
Date: Fri, 21 Apr 2006 15:18:57 -0400
From: Sherm Pendley <sherm@dot-app.org>
Subject: Re: Hebrew Calendar conversions?
Message-Id: <m28xpyivoe.fsf@Sherm-Pendleys-Computer.local>
"Shmuel (Seymour J.) Metz" <spamtrap@library.lspace.org.invalid> writes:
> Is there a Perl module for Hebrew->Gegorian and Gregorian->Hebrew date
> conversions?
In case you weren't aware of it, the CPAN search is your friend:
<http://search.cpan.org>
Using that, I found Date::Convert in less than ten seconds by searching
for "hebrew calendar".
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Fri, 21 Apr 2006 12:36:10 -0700
From: "Mothra" <mothra@nowhereatall.com>
Subject: Re: Hebrew Calendar conversions?
Message-Id: <44493be9$1@usenet.ugs.com>
Shmuel (Seymour J.) Metz wrote:
> Is there a Perl module for Hebrew->Gegorian and Gregorian->Hebrew date
> conversions?
Try datetime.perl.org
Mothra
------------------------------
Date: 21 Apr 2006 13:50:47 -0500
From: jgraber@ti.com
Subject: Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
Message-Id: <yvn3bg6lq48.fsf@famous02.dal.design.ti.com>
Here are some comments on Posting Guidelines rev 1.5
with 3 specific examples I think would be improvements.
Overview:
I find that Examples are easier to follow than Syntax descriptions.
Even at the risk of promoting "cargo cult" programming,
at least help readers pick a better cult.
Negative examples, followed by Positive examples are especially powerful.
for example, the fantastic book _Perl Best Practices_
I liked the section
"Carefully choose the contents of your Subject header "
because it has examples of the "Do not ..." sections
and has a URL for more info.
I think it would be worthwhile to include
one bad and one good subject line in the Guidelines itself.
BAD: Newbie, urgently need help with simple PERL question
GOOD: How do I change all 'a' to 'b' with a regexp?
I think the section
"Ask perl to help you"
would be more effective with the example,
rather than the existing syntax description.
use warnings; # see perldoc warnings
use strict; # see perldoc strict
I think the section
"Providing enough information"
would be FAR more effective with an example,
esp one that demonstrates __DATA__
There have been several good ones posted lately.
Regexp questions are common, so something similar
to the example below would be applicable to many posters.
Is there some standard syntax like ==cut==
to specify the beginning of the program,
the beginning of the output, end of output, etc?
Need a better example question than this one though......
( the answer to this one is use /g switch, or tr/a/b/;)
Here is an example example:
BAD: I'm using s/a/b/ but it doesnt work.
GOOD: with # annotation of good points
# repeat the question, dont just leave it in the subject line.
How do I change all 'a' to 'b' with a regexp?
# Show what you have tried so far, in short/complete/example code
Here is my code that doesnt do what I wanted.
# note that sample input data is included,
# and that script can be cut/pasted and be ready to run
==cut==
use warnings;
use strict;
while (<DATA>){
$_ =~ s/a/b/;
print $_;
}
__DATA__
First line of text data
Second line of text data
==cut==
# show your output, including any errors
# and point out what was not what you wanted/expected
Here is my output, note the trailing 'a' is not converted
First line of text dbta
Second line of text dbta
# Show your hand-generated desired output
I wanted ALL the 'a' to be changed to 'b', not just first ones
First line of text dbtb
Second line of text dbtb
# end example example....
--
Joel
------------------------------
Date: Fri, 21 Apr 2006 21:25:33 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
Message-Id: <Xns97ACB144C6962asu1cornelledu@127.0.0.1>
jgraber@ti.com wrote in news:yvn3bg6lq48.fsf@famous02.dal.design.ti.com:
> Is there some standard syntax like ==cut==
> to specify the beginning of the program,
> the beginning of the output, end of output, etc?
The shebang line serves fine to mark where the program begins.
Block comments can be easily included with
=for comment
blah blah
=cut
> # note that sample input data is included,
> # and that script can be cut/pasted and be ready to run
> ==cut==
Replace ==cut== with
#!/usr/bin/perl
> use warnings;
> use strict;
> while (<DATA>){
last if /^==cut==/;
> $_ =~ s/a/b/;
> print $_;
> }
> __DATA__
> First line of text data
> Second line of text data
> ==cut==
>
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Fri, 21 Apr 2006 14:08:41 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: show hidden value in variable.. with mysql.. FIXED
Message-Id: <slrne4ibdp.eo9.tadmc@magna.augustmail.com>
joe.henderson1@ <joe.henderson1@> wrote:
> But my question remains... "how did that null value get into that
> string"...?
It was probably put there by a C program somewhere, since C uses
a null byte to mark the end of strings.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 21 Apr 2006 21:08:52 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Term::ReadKey on Win? 5.005 vs 5.8.8?
Message-Id: <e2bhl4$2l6j$1@agate.berkeley.edu>
[A complimentary Cc of this posting was NOT [per weedlist] sent to
Dr.Ruud
<rvtol+news@isolution.nl>], who wrote in article <e2ailr.19k.1@news.isolution.nl>:
> >> I read the code for a few minutes and then tested this:
> > Is not a part of your message missing?
> Huh?
Eh? All your message contained was "I tested THIS code". No
information about the testing was contained.
> I was pointing to the difference between calling ReadKey with 0 and with
> '0E0'. The first has the "erratic" behaviour, the second not. See the
> conditionals involved in the source.
> I get the same results with "ReadKey 0, $in" vs. "ReadKey '0E0', $in".
I do not follow again. Is the result the same, or one `is "erratic"',
other not? And IS it the same as with getc?
> I didn't get why you use "getc" and not "ReadKey" (which not always
> uses "getc").
Because T:R:P uses getc().
> See perldoc Term::ReadKey, under ReadKey MODE [, Filehandle], at the end
> it mentions Windows and getc.
Did not find any mention of what you suggest (0 vs 0e0, Win and getc)
in 2.30.
> My conclusion at this moment: don't use "getc" but "ReadKey", and if you
> don't want ReadKey to use getc, but still want a blocked read, use MODE
> '0E0' (as a workaround).
Again, this looks like contradicting the other parts of your message.
Thanks,
Ilya
------------------------------
Date: Fri, 21 Apr 2006 15:42:21 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: XS Progamming with Perl 6
Message-Id: <x7d5fazpeq.fsf@mail.sysarch.com>
>>>>> "D" == Dave <daveandniki@ntlworld.com> writes:
D> What puts you off Perl6? What would you choose to use in its place?
and perl6 is much closer to perl5 than most realize. most of the super
fancy stuff (and there is plenty of that) will not be used day to
day. much of that is for specialized module writing and stuff that
usually won't be needed to get your job done.
just having a clean proper OO system and the grammar engine (which
replaces regexes) is enough to win most over. the rest is gravy.
damian conway did a talk where he took 5 tool scripts (used often by
their authors) and rewrote them in basic perl6 and they didn't change
much at all. then he rewrote them in good perl6 and they were shorter
and clearer as he took advantage of the new features.
when p5 came out there was a ton of p4 code running and some is still
out there. p5 code and cpan won't disappear when p6 comes out. and p6
will be able to run p5 code mixed with p6. so you can have your p5 code
and eat p6 too!
some of these quick pronouncement of never using p6 are silly. most who
claim that don't know much about it.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
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 9188
***************************************