[17145] in Perl-Users-Digest
Perl-Users Digest, Issue: 4557 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 9 00:10:26 2000
Date: Sun, 8 Oct 2000 21:10:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <971064614-v9-i4557@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 8 Oct 2000 Volume: 9 Number: 4557
Today's topics:
Numeric processing problem. <jondecamp@home.com>
Re: Numeric processing problem. (Randal L. Schwartz)
Re: Numeric processing problem. <godzilla@stomp.stomp.tokyo>
Re: OT: a matter of style (was: Re: PP, 3rd ed.???) <jdb@wcoil.com>
per page <troyr@vicnet.net.au>
Re: Perl and Outlook <bwalton@rochester.rr.com>
Re: Perl binary for BeOS r5 <elaine@chaos.wustl.edu>
Re: Perl Books! <uri@sysarch.com>
Re: Perl Books! <elaine@chaos.wustl.edu>
Perl compiler vivek@cse.iitd.ernet.in
Re: PP, 3rd ed.??? <jdb@wcoil.com>
Re: PP, 3rd ed.??? <jdb@wcoil.com>
Re: PP, 3rd ed.??? <jdb@wcoil.com>
Problem using perlcc with DBI (Cyrus Patel)
Re: running onothe program from perl <bwalton@rochester.rr.com>
string substitution <celliot@tartarus.uwa.edu.au>
test Tony Curtis <tony_curtis32@yahoo.com
Re: Thanks, I see the <bmb@ginger.libs.uga.edu>
Re: Variable names enclosed within curly braces <iltzu@sci.invalid>
Re: What does $++ mean? (=?ISO-8859-1?Q?=5C=28_dr0id=8F_=5C=29?=)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 09 Oct 2000 02:09:53 GMT
From: Jon DeCamp <jondecamp@home.com>
Subject: Numeric processing problem.
Message-Id: <39E129E3.649F8149@home.com>
Greetings, Perl Guru's,
I'm rather new to perl, so I have what seems to me to be an advanced
question. I'd like any advice that one could offer me on this, or any
information that may lead me in the right direction.
The situation: I have a large list of eleven digit numbers that I wish
to convert to six digit numbers. Obviously I am looking to be writing a
perl script to do this conversion, because I have massive quantities of
these numbers. I beleive that there must be some sort of algorithm that
I am looking for, but have no idea where to start. Here are some
examples of the numbers:
# Number # #Becomes#
15902616025
15902621045 928649
15902627050
15902633591
15902648236
15902677941 135373
15902684952 925768
15902712318 276640
As you can see, the six digit numbers that the eleven digits become are
in no particular order, which completely throws me off. So somehow
15902712318 becomes a smaller number like 276640.
My thanks (in advance) to any advice that can lead to the completion of
this puzzle.
-Jon DeCamp
------------------------------
Date: 08 Oct 2000 19:46:45 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Numeric processing problem.
Message-Id: <m1k8bi3f56.fsf@halfdome.holdit.com>
>>>>> "Jon" == Jon DeCamp <jondecamp@home.com> writes:
Jon> My thanks (in advance) to any advice that can lead to the completion of
Jon> this puzzle.
The first step is to answer for us... who determined that 15902621045
should become 928649? If that was you, what rule did you use? If
that wasn't you, go ask them what the rule is. And why do you have 11
digits becoming six?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Sun, 08 Oct 2000 20:51:15 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Numeric processing problem.
Message-Id: <39E140B3.A9D51C5A@stomp.stomp.tokyo>
"Randal L. Schwartz" wrote:
> > Jon wrote gibberish:
> > My thanks (in advance) to any advice that can lead to the completion of
> > this puzzle.
> The first step is to answer for us... who determined that 15902621045
> should become 928649? If that was you, what rule did you use? If
> that wasn't you, go ask them what the rule is. And why do you have 11
> digits becoming six?
Oh Randal, don't be such a klutz. This problem is
so SO easy to solve, look below. No, no, below
my signature, not THERE. Jeeeshh... men.
Shall I give Ollie another smack on his forehead
with my Duncan yo-yo?
Godzilla!
--
#!/usr/local/bin/perl
print "Content-Type: text/plain\n\n";
for ($iterate = 1; $iterate <= 6; $iterate++)
{ $number = int(rand(10)); $numbers = "$numbers$number"; }
print "Number: $numbers";
exit;
------------------------------
Date: 9 Oct 2000 03:44:16 GMT
From: "Josiah" <jdb@wcoil.com>
Subject: Re: OT: a matter of style (was: Re: PP, 3rd ed.???)
Message-Id: <8rreug$clf$0@206.230.71.39>
Godzilla! <godzilla@stomp.stomp.tokyo> wrote in message
news:39E0D905.B849B746@stomp.stomp.tokyo...
> Tim Hammerquist wrote:
>
> > Godzilla! wrote:
>
> (snipped)
>
> > Let me get this straight: _we_ annoy _you_?
>
>
> You have this straight, Frank.
>
then why are you still here, Annoyed ?
--
$cheers = $josiah;
------------------------------
Date: Mon, 9 Oct 2000 12:23:54 +1100
From: "Troy Rasiah" <troyr@vicnet.net.au>
Subject: per page
Message-Id: <679E5.23407$O7.347196@ozemail.com.au>
Hi guys,
I was wondering if there was a perl module that can do (number
of entries) per page....for the purpose of cgi thru the web....eg for
displaying a certain amount of entries per page in a guestbook
Thanks in advance
--
----------------------------------------------------------------------------
----------------
Troy
------------------------------
Date: Mon, 09 Oct 2000 01:43:43 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Perl and Outlook
Message-Id: <39E122CF.3CD297B@rochester.rr.com>
vivi16@my-deja.com wrote:
>
> In a Perl file I want to send the results of a form to the user via E-
> mail. Is it possible to use MS Outlook as the mail program? And does
> the program have to reside on the server where the Perl program is?
>
> I recall reading in this discussion group (though can't find it now)
> someone saying that this might be possible (using Outlook and not
> having it reside on the local server).
...
I don't know much about Outlook, but my impression is that it is a mail
client program, not a mail server. If so, you would be a lot better off
having your Perl program communicate directory with your mail server,
probably with something like
use Net::SMTP;
rather than trying to interface to Outlook and have it so the connection
to the server.
--
Bob Walton
------------------------------
Date: Mon, 09 Oct 2000 01:56:47 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: Perl binary for BeOS r5
Message-Id: <B6069E20.7A8A%elaine@chaos.wustl.edu>
in article 8rptrh$ljr$1@news6.svr.pol.co.uk, Makhno at
mak@imakhno.freeserve.co.uk quoth:
> Does anybody know where I can get hold of a binary Perl distribution that
> was compiled under BeOS r5? I've contacted Tom Spindler, the maintainer of
> the r4-compiled perl binary, but I hear from other newsgroups that he's no
> longer responding.
Not presently, but if you do find one that is publicly available or make one
yourself for distribution, please let cpan@perl.org know so that we can list
it on the ports page.
e.
------------------------------
Date: Sun, 08 Oct 2000 22:23:03 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Perl Books!
Message-Id: <x7em1r2cs9.fsf@home.sysarch.com>
>>>>> "JZ" == Jeff Zucker <jeff@vpservices.com> writes:
JZ> YMEY wrote:
>>
>> "Clinton A. Pierce" wrote:
>> >
>> > In article <39E0B242.31F59824@hotmail.com>,
>> > YMEY <ymeydotcom@hotmail.com> writes:
>> > > Perl 5 by Example
>> > > Perl Quick Reference
>> > > Teach yourself Perl 5 in 21 days
>> > > Using Perl for web programing
>> > > Teach Yourself CGI Programming with PERL 5 in a Week, 2E --
>> >
>> > In this case, those that read this pirated material will eventually
>> > get what they deserve.
>> >
>>
>> LOL, I guess checking the same books out from the library and scanning
>> pages through "Text Bridge" for later reference is pirating to
JZ> "for later [personal] reference" is different than "for distributing to
JZ> the public".
well, it is moot as all the books he lists are crappy. but anyhow he is
stealing or promoting piracy. he just doesn't know it.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Mon, 09 Oct 2000 02:23:57 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: Perl Books!
Message-Id: <B606A47F.7A8C%elaine@chaos.wustl.edu>
in article 39E0E0A3.95E5F2DC@hotmail.com, YMEY at ymeydotcom@hotmail.com
quoth:
> LOL, I guess checking the same books out from the library and scanning
> pages through "Text Bridge" for later reference is pirating to... LMAO I
> think you need to look up the definition of "Piracy" as the law sees
> it...
Yes, scanning in text from a book without permission from the publisher is
theft. In the first few pages of any book is the copyright page that usually
includes such text as 'may not be reproduced without the consent of the
publisher'. Piracy is not about Captain Hook :)
The whole issue of intellectual property, copyright and the internet is one
that will possibly have a great deal of press in the next few years.
Personally, I despise lawyers and litigation and I spend a large part of my
income on books. However you define 'piracy', unless you were raised by
grifters, you know that putting copyrighted material on the net isn't right
and is no different than doing the same with software, etc. If you wrote a
book would you have someone do this to your hard work?
Subscribe to some of the intellectual property mailing lists and you'll,
perhaps, start to appreciate just how complex and painful the process will
be over the next decade.
e.
------------------------------
Date: Mon, 09 Oct 2000 03:42:54 GMT
From: vivek@cse.iitd.ernet.in
Subject: Perl compiler
Message-Id: <8rreru$4dc$1@nnrp1.deja.com>
Can you please guide me to a perl compiler.
( i would like to have a script having Tk compiled)
Vivek Malik
icq: 57264676
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 9 Oct 2000 03:44:42 GMT
From: "Josiah" <jdb@wcoil.com>
Subject: Re: PP, 3rd ed.???
Message-Id: <8rreva$clm$0@206.230.71.39>
Brad Baxter <bmb@ginger.libs.uga.edu> wrote in message
news:Pine.A41.4.21.0010081014580.16452-100000@ginger.libs.uga.edu...
> On Fri, 6 Oct 2000, Godzilla! wrote:
> > Josiah wrote:
> > > Geesh Kiralynne... can't you answer with a bit of Kindness? There is
> >
> > Clearly you have mistaken me for someone who cares.
> >
>
> Truer words ...
Amen! :-)
--
$josiah;
------------------------------
Date: 9 Oct 2000 03:47:18 GMT
From: "Josiah" <jdb@wcoil.com>
Subject: Re: PP, 3rd ed.???
Message-Id: <8rrf46$csr$0@206.230.71.39>
Godzilla! <godzilla@stomp.stomp.tokyo> wrote in message
news:39E0B2F1.B2DD92D5@stomp.stomp.tokyo...
> David Steuber wrote:
>
> > Elaine Ashton <elaine@chaos.wustl.edu> writes:
>
> > Godzilla! wrote:
<snip>
> Stereotypical functional illiterates. How annoying
> to open an article only to read such ignorance and
> envy motivated hatred being displayed by so many
> and, consistently by you, Frank.
<snip>
and who is your beloved Frank whom you so fondly refer to, might I ask? :-)
there has been no poster by that name in the thread, and I seem
to miss any clues in context as who it might be. cherio darln.
--
$cheers = <$josiah>;
------------------------------
Date: 9 Oct 2000 03:49:36 GMT
From: "Josiah" <jdb@wcoil.com>
Subject: Re: PP, 3rd ed.???
Message-Id: <8rrf8g$d2h$0@206.230.71.39>
Ted Zlatanov <tzz@iglou.com> wrote in message
news:970888989.157@iglou.com...
> My review of PP3 at
> http://www-4.ibm.com/software/developer/library/l-perl5.html?dwzone=linux
> goes through every chapter in detail, if you are interested.
very good and helpful - great job!
--
$cheers = <josiah>;
------------------------------
Date: 9 Oct 2000 01:42:06 +1100
From: cyrus@cyrus.kitenet.net (Cyrus Patel)
Subject: Problem using perlcc with DBI
Message-Id: <39e087be$1@nexus.comcen.com.au>
Hello,
I'm trying to compile a perl program into binary using perlcc. The perl
script uses "DBI.pm".
After I compiled it and ran it I got the error:
Can't load module DBI, dynamic loading not available in this perl.
(You may need to build a new perl executable which either supports
dynamic loading or has the DBI module statically linked into it.)
at /usr/lib/perl5/5.005/i386-linux/DBI.pm line 158
BEGIN failed--compilation aborted at
/usr/lib/perl5/5.005/i386-linux/DBI.pm line 158.
BEGIN failed--compilation aborted at strictcommon.pl line 21.
Any ideas why it's not linking to DBI.so? This is a potato box...
Thanks in advance,
Cyrus
--
Cyrus Patel - cyrus@linuxfan.com
Dept. of Computer Engineering Debian GNU/Linux
University of New South Wales (Woody)
Sydney, Australia. ICQ: 50738541
http://www.cyrusp.com Mobile: 0402 266 731 cyrusmobile@linuxfreak.com
------------------------------
Date: Mon, 09 Oct 2000 01:11:09 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: running onothe program from perl
Message-Id: <39E11B27.E729C847@rochester.rr.com>
"me.here" wrote:
>
> Hi
> I am moving a script from Activestate perl on NT
> to the same on windows 95.
> this command works fine on NT but not in the windows 98 machine
>
> my $ImageInfo = qx/c:\\image\\identify $homedir\\$image1/;
>
> it seams to run the program fine but I don't get the results in the variable
> as I used to.
> Any Ideas what I've missed?
>
> Phil
...
I have noted a similar problem on Windoze 98 SE, in which the output of
commands executed by qx// is not returned to the output variable, but is
instead output to the console window. It appears to happen only on rare
machines (it messes up on only one of the many systems on which I have
had software using this feature running). Someone else a few weeks ago
complained of a similar situation in this newsgroup. So far, I don't
have a clue as to what kicks it off, or how to fix it. I don't know if
it ever happens on Windoze 95 or not (you're a bit unclear on whether
you're using 95 or 98). Sorry I can't be of more help.
--
Bob Walton
------------------------------
Date: Mon, 9 Oct 2000 11:35:54 +0800
From: "Cameron Elliott" <celliot@tartarus.uwa.edu.au>
Subject: string substitution
Message-Id: <39e13d6f$0$27594@echo-01.iinet.net.au>
I think this is pretty complex and any help would be greatly appreciated.
I have tried but cant find a way to do it without looping through the string
many times...(and that still doesn't work)
------------------
I want to be able to remove the following from a string:
all { and }'s
any \ followed by any chars or numbers except
\ followed by s followed by numbers and ie. \s23 \s43
\ followed by cell ie. \cell
basically I have a string and want only the words without \ infront of them
plus \cell and \s23 (any number) and also want to remove all { and }'s.
thankyou
Cameron
------------------------------
Date: Mon, 09 Oct 2000 01:48:27 GMT
From: Tony Curtis <tony_curtis32@yahoo.com
Subject: test
Message-Id: <878zryhjh8.fsf@timmy.dummy.org>
test, then cancel
------------------------------
Date: Sun, 8 Oct 2000 21:12:52 -0400
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: Thanks, I see the
Message-Id: <Pine.A41.4.21.0010082111330.13236-100000@ginger.libs.uga.edu>
On Sun, 8 Oct 2000 harry@drej.com wrote:
> I see that my lousy IBM 4029 omitted a verticle bar ...
I hate when that happens.
Brad
------------------------------
Date: 9 Oct 2000 00:59:22 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Variable names enclosed within curly braces
Message-Id: <971051803.24852@itz.pp.sci.fi>
In article <MPG.1447be54fc1ff1fd98ae16@nntp.hpl.hp.com>, Larry Rosler wrote:
>I think the same generalization applies to overparenthesizing of
>arithmetic expressions, for example. But many authorities believe that
>it leads to clarity.
>
> $x = $y + ($z * $w);
>
>Having been inculcated into the rules of arithmetic precedence since
>elementary algebra, I try in vain to divine the significance of the
>parentheses, and conclude that the programmer is less than adept. But
Just to pull this thread completely off topic, last year I had the
misfortune of working with a truly horrendous script language named
Lite. For those who have not encountered this wart on the side of
mSQL, it essentially looks like a mix of bad C and worse Perl, with
the worst sides of both combined. Except it's actually worse.
Just one of its many misfeatures is a complete lack of arithmetic
precedence. Yes, in Lite $x = $y + $z * $w would get parsed as if it
were $x = ($y + $z) * $w. That's not the worst thing, however. The
really amazing part is that we didn't actually discover this specific
problem until we'd been using the language for over a year, when an
unusually complex expression (for that language, that is) I'd written
tickled the bug and made a heuristic weighing function produce subtly
suboptimal results under certain conditions.
They've now switched completely to Java. There's still quite a lot of
legacy code in various places left, but I don't work there anymore so
I won't have to touch or even see any of it anymore.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla | "By promoting postconditions to
and its pseudonyms - | preconditions, algorithms become
do not feed the troll. | remarkably simple." -- Abigail
------------------------------
Date: Sun, 8 Oct 2000 21:50:50 -0400 (EDT)
From: dr0id@webtv.net (=?ISO-8859-1?Q?=5C=28_dr0id=8F_=5C=29?=)
Subject: Re: What does $++ mean?
Message-Id: <26980-39E1247A-47@storefull-611.iap.bryant.webtv.net>
heh i always though ++ meant an increment
example : ++$blah; or $blah++;
------------------------------
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 4557
**************************************