[29711] in Perl-Users-Digest
Perl-Users Digest, Issue: 955 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 19 21:10:12 2007
Date: Fri, 19 Oct 2007 18:09:08 -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, 19 Oct 2007 Volume: 11 Number: 955
Today's topics:
"Can't locate object method "PV" via package "B::SPECIA <socyl@987jk.com.invalid>
Re: How to print integers so that they get thousands se <mritty@gmail.com>
Re: How to print integers so that they get thousands se <ignoramus5114@NOSPAM.5114.invalid>
Re: How to print integers so that they get thousands se <1usa@llenroc.ude.invalid>
Re: perl standard <jo@durchholz.org>
Re: perl standard <bik.mido@tiscalinet.it>
Re: perl standard <bik.mido@tiscalinet.it>
Re: perl standard <zaxfuuq@invalid.net>
Re: perl standard <abigail@abigail.be>
Re: perl standard <jurgenex@hotmail.com>
Re: perl standard <RedGrittyBrick@SpamWeary.foo>
Re: perl standard <benkasminbullock@gmail.com>
Re: perl standard <benkasminbullock@gmail.com>
Re: perl standard <bik.mido@tiscalinet.it>
Re: perl standard <benkasminbullock@gmail.com>
Re: please help optimize sub QoS@domain.invalid
Re: polymorphic regex -- encoding issue <nospam-abuse@ilyaz.org>
Re: Using IDL from a perl script <bik.mido@tiscalinet.it>
Re: Using IDL from a perl script <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 19 Oct 2007 22:53:01 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: "Can't locate object method "PV" via package "B::SPECIAL""
Message-Id: <ffbcgd$3fg$1@reader1.panix.com>
When I try to use B::Lint I get the error
Can't locate object method "PV" via package "B::SPECIAL""
Does anyone know where B::SPECIAL is defined?
TIA,
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
------------------------------
Date: Fri, 19 Oct 2007 11:14:03 -0700
From: Paul Lalli <mritty@gmail.com>
Subject: Re: How to print integers so that they get thousands separated by underscores
Message-Id: <1192817643.190157.130100@v23g2000prn.googlegroups.com>
On Oct 19, 1:47 pm, Ignoramus5114 <ignoramus5...@NOSPAM.5114.invalid>
wrote:
> Thanks! Now I know what FAQ question I should have asked.
Out of pure curiousity, are you aware you can get a listing of ALL the
Perl FAQs, without having to know any keywords?
Type
perldoc perlfaq
into your command line. It will give you a list of all the questions,
as well as the number of the FAQ that each one is found in, so you can
read the answer.
Paul Lalli
------------------------------
Date: Fri, 19 Oct 2007 13:17:25 -0500
From: Ignoramus5114 <ignoramus5114@NOSPAM.5114.invalid>
Subject: Re: How to print integers so that they get thousands separated by underscores
Message-Id: <95CdnYWHJYwoaYXanZ2dnUVZ_tTinZ2d@giganews.com>
On 2007-10-19, Paul Lalli <mritty@gmail.com> wrote:
> On Oct 19, 1:47 pm, Ignoramus5114 <ignoramus5...@NOSPAM.5114.invalid>
> wrote:
>> Thanks! Now I know what FAQ question I should have asked.
>
> Out of pure curiousity, are you aware you can get a listing of ALL the
> Perl FAQs, without having to know any keywords?
>
> Type
> perldoc perlfaq
> into your command line. It will give you a list of all the questions,
> as well as the number of the FAQ that each one is found in, so you can
> read the answer.
>
> Paul Lalli
>
I had no idea. I am going to add this to my computer notes file, it is
highly useful. Thanks.
i
------------------------------
Date: Fri, 19 Oct 2007 18:31:44 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How to print integers so that they get thousands separated by underscores
Message-Id: <Xns99CE93CA6FA79asu1cornelledu@127.0.0.1>
Paul Lalli <mritty@gmail.com> wrote in news:1192817643.190157.130100
@v23g2000prn.googlegroups.com:
> On Oct 19, 1:47 pm, Ignoramus5114 <ignoramus5...@NOSPAM.5114.invalid>
> wrote:
>> Thanks! Now I know what FAQ question I should have asked.
>
> Out of pure curiousity, are you aware you can get a listing of ALL the
> Perl FAQs, without having to know any keywords?
I recommend reading the FAQ (not necessarily in detail, maybe just
skimming) every time one installs a new Perl distribution.
I recommend looking at the relevant sections of the FAQ to see if any of
the headings are relevant to one's problem.
The form
perldoc -q "faq heading"
is a short hand for referring someone else to a given FAQ item.
> Type
> perldoc perlfaq
> into your command line.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
Date: Fri, 19 Oct 2007 20:09:55 +0200
From: Joachim Durchholz <jo@durchholz.org>
Subject: Re: perl standard
Message-Id: <ffart9$3jm$2@online.de>
Jim Gibson schrieb:
> In article <ffa2cl$33s$1@online.de>, Joachim Durchholz
> <jo@durchholz.org> wrote:
>
>> Abigail schrieb:
>>> _
>>> I don't necessarely agree with his conclusion, but he
>>> makes some interesting arguments.
>>>
>>> [1] http://www.perl.com/pub/a/2000/06/rosler.html
>> I see just one argument: that large bodies (corporations, governments)
>> won't use a language that's not standardized.
>> Did I overlook something?
>
> Apparently. I also saw:
>
> [...]
None of which are arguments for or against standardization.
Which is what this subthread is about, so I omitted the qualification.
Sorry for being overly terse.
Regards,
Jo
------------------------------
Date: Fri, 19 Oct 2007 20:29:52 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: perl standard
Message-Id: <4lthh396t48gqt68c8ovm20vu32g0kfvcr@4ax.com>
On Fri, 19 Oct 2007 17:42:14 GMT, Uri Guttman <uri@stemsystems.com>
wrote:
>seem to work so who knows!? anyone seen the antiscam commercials
>(sponsored by the post office!) which show a f2f nigerian style scam and
>how silly they seem in person?
Occasionally seen some services off a very popular satyrical news
program of Italian television, in which a fake victim contacts them
and pretends to be going to give the money... until the spokeperson
pops out with microphone and cameras.
[*] Not technical English and thus some terms may be lexically
inaccurate. If people understand nontheless, then please correct me.
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: Fri, 19 Oct 2007 20:30:33 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: perl standard
Message-Id: <ltthh3hpo0s21tb3ef691hqmudtdmrch8i@4ax.com>
On Fri, 19 Oct 2007 17:39:44 GMT, Uri Guttman <uri@stemsystems.com>
wrote:
>i will print up all of the perldocs into paper or pdf's and sell it to
>him for $250. not a bad profit margin. :)
Go pdf, a larger margin for sure.
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: Fri, 19 Oct 2007 13:54:42 -0700
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: perl standard
Message-Id: <ivudnRhzDfXgloTanZ2dnUVZ_tCrnZ2d@comcast.com>
"Joachim Durchholz" <jo@durchholz.org> wrote in message
news:ff9upn$tr1$2@online.de...
>A standard serves to make the implementations converge on a common
>semantics. Since Perl is a single-implementation language, there is no need
>for a standard.
Again, 100% wrong.
I've got $250.-, but I'd rather spend it on this brunnette named Dani than a
standard that is beyond me right now. When did the Perl Programming come to
exist? We, in the fortran club, know this number well and in two different
ways. We celebrated our 50th birthday last year, but we also have a
diffrent pedigree with the standard. We beginn there at 66. Then there's
77, 90, 95, 2003, 2008. Does the PPL have a similar list?
--
wade ward
"Nicht verzagen, Bruder Grinde fragen."
------------------------------
Date: 19 Oct 2007 20:06:31 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: perl standard
Message-Id: <slrnfhi3i5.ds1.abigail@alexandra.abigail.be>
_
Wade Ward (zaxfuuq@invalid.net) wrote on VCLXII September MCMXCIII in
<URL:news:ivudnRhzDfXgloTanZ2dnUVZ_tCrnZ2d@comcast.com>:
||
||
|| "Joachim Durchholz" <jo@durchholz.org> wrote in message
|| news:ff9upn$tr1$2@online.de...
|| >A standard serves to make the implementations converge on a common
|| >semantics. Since Perl is a single-implementation language, there is no need
|| >for a standard.
|| Again, 100% wrong.
||
|| I've got $250.-, but I'd rather spend it on this brunnette named Dani than a
|| standard that is beyond me right now. When did the Perl Programming come to
|| exist? We, in the fortran club, know this number well and in two different
|| ways. We celebrated our 50th birthday last year, but we also have a
|| diffrent pedigree with the standard. We beginn there at 66. Then there's
|| 77, 90, 95, 2003, 2008. Does the PPL have a similar list?
man perlhist
Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
------------------------------
Date: Fri, 19 Oct 2007 21:17:58 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: perl standard
Message-Id: <aa9Si.661$6P3.364@trndny02>
Wade Ward wrote:
> beginn there at 66. Then there's 77, 90, 95, 2003, 2008. Does the
> PPL have a similar list?
Well, today the ICAO is responsible for standardizing PPL requirements
worldwide although individual countries retain a large degree of freedom to
adapt the requirements to their individual local situations. I don't know
when the first agreement was signed, but my guess would be not long after it
was founded in 1947.
However there were other organizations and treaties long before that. The
first conference took place in 1910 already.
But what does this have to do with the subject of this NG?
jue
------------------------------
Date: Fri, 19 Oct 2007 22:32:59 +0100
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: perl standard
Message-Id: <3eidnVXm850Pv4TanZ2dneKdnZydnZ2d@bt.com>
Abigail wrote:
> _
> Wade Ward (zaxfuuq@invalid.net) wrote:
> || When did the Perl Programming come to
> || exist? We, in the fortran club, know this number well and in two different
> || ways. We celebrated our 50th birthday last year, but we also have a
> || diffrent pedigree with the standard. We beginn there at 66. Then there's
> || 77, 90, 95, 2003, 2008. Does the PPL have a similar list?
>
>
> man perlhist
>
perldoc perlhist
------------------------------
Date: Fri, 19 Oct 2007 22:10:13 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: perl standard
Message-Id: <ffba05$f43$1@ml.accsnet.ne.jp>
On Fri, 19 Oct 2007 12:54:15 +0200, Michele Dondi wrote:
> Strictly speaking I suspect that you'd be right, but with
> "implementation" I meant everything that comes with an implemented Perl,
> the documentation being part of that.
You are claiming that Perl is "defined by its implementation" while at the
same time failing to define clearly what "implementation" means. If
the documentation which comes with Perl is inconsistent with the behaviour
of the computer program "perl", is the documentation correct and the
program faulty, or vice-versa? Or what if "perl" has some abilities which
aren't even mentioned in the documentation?
------------------------------
Date: Fri, 19 Oct 2007 22:28:46 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: perl standard
Message-Id: <ffbb2u$f43$2@ml.accsnet.ne.jp>
On Fri, 19 Oct 2007 11:04:49 +0200, Dr.Ruud wrote:
> ... The documentation is an important part of the implementation. So is
> CPAN, for example all the testcode of the serious modules.
What to do if Perl fails the tests though, or if the documentation and the
program disagree?
------------------------------
Date: Sat, 20 Oct 2007 01:32:53 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: perl standard
Message-Id: <kifih35b8b7ib917pvlhperq7drorjol61@4ax.com>
On Fri, 19 Oct 2007 22:10:13 +0000 (UTC), Ben Bullock
<benkasminbullock@gmail.com> wrote:
>You are claiming that Perl is "defined by its implementation" while at the
>same time failing to define clearly what "implementation" means. If
>the documentation which comes with Perl is inconsistent with the behaviour
>of the computer program "perl", is the documentation correct and the
>program faulty, or vice-versa? Or what if "perl" has some abilities which
It depends: p5p's can tell. Someone must take care of making them
agree.
>aren't even mentioned in the documentation?
Someone must take care of mentioning them somewhere in the
documentation.
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: Sat, 20 Oct 2007 00:51:41 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: perl standard
Message-Id: <ffbjer$hif$2@ml.accsnet.ne.jp>
On Sat, 20 Oct 2007 01:32:53 +0200, Michele Dondi wrote:
> On Fri, 19 Oct 2007 22:10:13 +0000 (UTC), Ben Bullock
> <benkasminbullock@gmail.com> wrote:
>
>>You are claiming that Perl is "defined by its implementation" while at the
>>same time failing to define clearly what "implementation" means. If
>>the documentation which comes with Perl is inconsistent with the behaviour
>>of the computer program "perl", is the documentation correct and the
>>program faulty, or vice-versa? Or what if "perl" has some abilities which
>
> It depends: p5p's can tell. Someone must take care of making them
> agree.
In other words you're admitting that the language isn't actually defined
anywhere.
------------------------------
Date: Fri, 19 Oct 2007 21:06:17 GMT
From: QoS@domain.invalid
Subject: Re: please help optimize sub
Message-Id: <d%8Si.109$na2.21@trndny08>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message-id: <Xns99CE679C8390Aasu1cornelledu@127.0.0.1>
>
> QoS@domain.invalid wrote in news:7w%Ri.11666$2o1.11629@trnddc03:
>
> >
> > "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message-id:
> > <Xns99CDEDF12F316asu1cornelledu@127.0.0.1>
>
> ...
>
> >> up separate scripts. Now that I am reasonably certain the optimized
> >> routine returns the same results as the original, it might be
> >> worthwhile to set up a script using Benchmark to be able to compare
> >> speeds on different platforms as it becomes necessary but I am going
> >> to leave that to the OP.
> ...
>
> > Thanks for helping with this, the early return is a good idea. I
> > enjoyed reading all of your comments and suggestions, and am excited
> > to implement some of the suggestions this weekend.
>
> You are welcome and good luck.
>
>
> >> --
> >> A. Sinan Unur <1usa@llenroc.ude.invalid>
>
> Note that quoting signatures is frowned upon in general. You newsreader
> might have an option to automatically snip sigs that use the proper sig
> separator.
>
> Sinan
>
Good idea, I will add this option to NewsSurfer soon. Thanks for helping
with the development of my newsreader, it has been a tricky program to
write; and any suggestions for improving it are extreamly valuable to me.
Best Regards,
Jason
------------------------------
Date: Fri, 19 Oct 2007 21:09:13 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: polymorphic regex -- encoding issue
Message-Id: <ffb6dp$5ne$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Dale
<dale.gerdemann@googlemail.com>], who wrote in article <1192794909.831588.269070@z24g2000prh.googlegroups.com>:
> # CP1251 is an extended ASCII charset in the range 00-FF. Here we
> # get this set of characters and decode them into Unicode.
> my @cp1251_charset =3D
> split(//, decode("CP1251", join("", map { chr } 0x00..0xFF)));
>
> # Find out which of these characters are matched by '\w' (in Unicode).
> my @cp1251_wordchars =3D
> grep(/\w/, @cp1251_charset);
>
> # The matched word characters are put back into CP1251
> my $w =3D encode("CP1251", join("", @cp1251_wordchars));
To baroque, IMO. I would use something like
my $w = join '', grep +(decode 'cp1251', $_) =~ /\w/, map chr, 0x00..0xFF;
Your approach has a chance to be quickier, though, but since this
should only run once... [I did not benchmark them.]
Ilya
------------------------------
Date: Fri, 19 Oct 2007 20:33:58 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Using IDL from a perl script
Message-Id: <o3uhh3diqobs0os3m1mpoco3a77jankfk3@4ax.com>
On Fri, 19 Oct 2007 11:02:41 -0700, James Everton
<james.everton@gmail.com> wrote:
>open(IDL, "|/usr/local/bin/idl -32");
>print IDL <<"ENDIDL";
>var1 = '$myPerlVar1'
>var2 = '$myPerlVar2'
>.compile my_web_script
>my_web_script, var1, var2
>ENDIDL
>
>I'm wondering if there is any way to pass from this IDL block (say for
>instance that the my_web_script procedure was actually a function and
>was assigned to a new variable returnVar) out to the containing perl
>script. For those that don't know IDL, I'm quite certain that you can
IPC::Open{2,3}
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: Fri, 19 Oct 2007 18:37:29 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Using IDL from a perl script
Message-Id: <Xns99CE94C464CC2asu1cornelledu@127.0.0.1>
James Everton <james.everton@gmail.com> wrote in
news:1192816961.304312.109840@q3g2000prf.googlegroups.com:
> I'm developing some web scripts in perl that interact with a database
> through various pre-written IDL procedures here at my work. The
> problem I'm having is getting arguments passed between the two.
> Passing from the perl into the IDL code is easy enough because I'm
> using the open( ) procedure and simply writing the strings as a block:
>
> open(IDL, "|/usr/local/bin/idl -32");
> print IDL <<"ENDIDL";
> var1 = '$myPerlVar1'
> var2 = '$myPerlVar2'
> .compile my_web_script
> my_web_script, var1, var2
> ENDIDL
Instead of typing the code yourself, you are having perl type the code.
This is not what I understand from "passing arguments".
> I'm wondering if there is any way to pass from this IDL block (say for
> instance that the my_web_script procedure was actually a function and
> was assigned to a new variable returnVar) out to the containing perl
> script.
There is a serious disconnect in your thinking here. You just opened a
write-only pipe to the /usr/local/bin/idl process. Even if you could
pass some return values (by having the IDL script throw an error), it
would be cumbersome.
Maybe perldoc perlipc can help but you need to improve your
understanding of how interprocess communications work. Why are you
writing the script above? Why wouldn't you just type your IDL program in
an editor rather than generating these scripts using Perl?
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
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 V11 Issue 955
**************************************