[14132] in Perl-Users-Digest
Perl-Users Digest, Issue: 1541 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 1 18:16:13 1999
Date: Wed, 1 Dec 1999 15:15:58 -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: <944090158-v9-i1541@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 1 Dec 1999 Volume: 9 Number: 1541
Today's topics:
Re: PPM not working <cassell@mail.cor.epa.gov>
Re: Problem including custom module <jeff@vpservices.com>
Re: Quick Question about regexp, $& and $1 (Andrew Johnson)
read win.ini and write to shellvariables <sebastian.kaiser@gmx.net>
Re: regex for overlapped pairs (Martien Verbruggen)
Regular Expression Problem... <julius_mong@hotmail.com>
Regular Expression Problem <julius_mong@hotmail.com>
Re: Regular Expression Problem <emschwar@rmi.net>
Re: russian perl-zine <alex@kawo2.rwth-aachen.de>
Re: Safe regular expressions toni@dse.nl
Re: sample mail pipe <cassell@mail.cor.epa.gov>
Re: sample mail pipe <gellyfish@gellyfish.com>
Re: sample mail pipe (Martien Verbruggen)
Re: Send a website visitor an email based on visitors I <cassell@mail.cor.epa.gov>
Re: Sending email <cassell@mail.cor.epa.gov>
Re: Sending mail <cassell@mail.cor.epa.gov>
Re: Setting umask (Martien Verbruggen)
Re: shopping cart with Perl <AgitatorsBand@yahoo.com>
Single quotes Vs. Double quotes <kraja@miel.mot.com>
Re: Single quotes Vs. Double quotes <lr@hpl.hp.com>
Re: sockets/winsock.pm <cassell@mail.cor.epa.gov>
Re: Source Code Open Season (was Re: Devoo.com : source (Martien Verbruggen)
Re: The Man Who Loved Numbers brianschilds@my-deja.com
Re: The Man Who Loved Numbers (Craig Berry)
Re: The Man Who Loved Numbers (Craig Berry)
Re: The Man Who Loved Numbers <slanning@bu.edu>
Re: The Man Who Loved Numbers (Abigail)
Updated Llama (was Re: Looking for a good Perl Book) (Randal L. Schwartz)
Re: Urgent - Executing a Perl program from another perl <cassell@mail.cor.epa.gov>
Re: variable in regex <sterling@udhcp123.zk3.dec.com>
Re: variable in regex <cassell@mail.cor.epa.gov>
Re: Winsock Problem with TCP Port 13 <gellyfish@gellyfish.com>
Re: Winsock Problem with TCP Port 13 (Martien Verbruggen)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 01 Dec 1999 12:10:06 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: PPM not working
Message-Id: <3845809E.324BD949@mail.cor.epa.gov>
Juha Manninen wrote:
>
> Hello again!
> I got Netscape working for News, so you won't see 'Before you buy' any more.
Well, not from you. But deja.com is still the major contributor
of less-than-wonderful posts in this newsgroup, utterly dwarfing
AOL and even WebTV. So I see it a lot.
> I promise to read the documentation once more, but I feel this is not about
> wrong proxy-settings.
> Eg. 'ppm version' should not depend on proxy-settings, or does it? It also
> gives the Usage-help.
You may be right. There are ways to accidentally trash your
ppm program. But I would suggest that you try these steps:
[1] Follow to the letter the steps in the docs to copy the
file for MIME::Base64 to your hard drive and install it
from there. If that works, then it is probably proxy
settings.
[2] If that fails, then you may want to go to ActiveState and
look for info on patching up your ppm program. I believe
that they have posted at least one thing on it, although
I do not remember where.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 1 Dec 1999 19:31:18 GMT
From: Jeff Zucker <jeff@vpservices.com>
To: mmiddlemist@feesh-ia.com
Subject: Re: Problem including custom module
Message-Id: <3845772E.3F2B22AA@vpservices.com>
[posted and mailed]
Mark Middlemist wrote:
>
> If anyone could email me with some advice on this I would be most
> grateful.
Ok, but it is better to check the newsgroup.
> I've written my own perl module which is in the same directory as
> the CGI scripts that use it (I've checked the @INC array and . is in
> there) but any scripts that try to use or require it come up with an
> Internal Server Error, even if all the they do is require it without
> calling any functions.
>
> In offline mode the script runs through OK, without complaining of
> any unterminated lines, unmatched brackets, etc.
"./" is relative to where the script is run from. Your webserver is
running the script from someplace different than you are when you run it
offline. You need to "use lib qw(/hard/path/to/module/directory/);" or
else something like the FindBin module to ensure that the directory
containing your module is findable regardless of where the script is run
from.
--
Jeff
------------------------------
Date: Wed, 01 Dec 1999 19:23:35 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Quick Question about regexp, $& and $1
Message-Id: <XAe14.2723$f5.27030@news1.rdc1.mb.home.com>
In article <823lck$1n4$1@bond.dk.uu.net>,
Steve Ball <steve@berlingske.dk> wrote:
! A bunch of us - inexperienced - perl newbies have been puzzling over how to
! do the following:
!
! $myvar="12345678xStevex12345678"
!
! ...what we want is to extract the string xStevex (or better, Steve) from the
! above string, and store it in a NEW string, $newvar.
[snip]
! There must be a one-liner out there! Or at least a neater way than I'm
! using...
A bunch of you? If this is homework then I understand your plight and
therefore will provide you with a quick one-liner so you can turn in
your assignment right away:
$newvar = join q++=>grep!m^[\^\D]|x^=>split qr<#:-)=>x=>$myvar;
If the homework assumption is incorrect then you should have plenty
of time to review the 'm/PATTERN/cgimosx' entry in the perlop
manpage and peruse the perlre manpage -- pay particular attention
to capturing matches into $1, and the return value of the m//
operator in list context with and without capturing parens.
andrew
--
Andrew L. Johnson http://www.manning.com/Johnson/
Where the hell are my fries, kid?
-- Tom Christiansen, on comp.lang.perl.misc
------------------------------
Date: Wed, 01 Dec 1999 21:40:06 +0100
From: Sebastian Kaiser <sebastian.kaiser@gmx.net>
Subject: read win.ini and write to shellvariables
Message-Id: <384587A6.B41F7436@gmx.net>
i´m completely new to perl and ask if its possible to read all the
sections in win.ini or samba.conf and write them to Shellvariables
like this ->
before
[section]
var1=no
var2=yes
after (echo $VAR1, $VAR2)
VAR1=no
VAR2=yes
Thanx for advisory
--
Sebastian Kaiser <Sebastian.Kaiser@gmx.net>
Fon/Fax: +49.30.8527974
------------------------------
Date: Wed, 01 Dec 1999 22:45:26 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: regex for overlapped pairs
Message-Id: <ayh14.269$JO3.3602@nsw.nnrp.telstra.net>
On Wed, 01 Dec 1999 10:23:29 GMT,
Bart Lateur <bart.lateur@skynet.be> wrote:
> Soetjianto wrote:
>
> >If I have html document like:
> >
> ><td> ...
> > <td>...</td>
> > <td>...</td> ...
> ></td>
> >
> >How can I write a regex that will find all the <td>...</td> pairs correctly?
\begin{offtopic}
> If you have, that's a faulty document. <TD> elements can't be nested.
unless the '...' bits contain appropriate <table> and <tr> tags. But
that would mean that the OP has left out some seriously important
information, which of course, is not umimaginable.
\end{offtopic}
Martien
--
Martien Verbruggen |
Interactive Media Division | The gene pool could use a little
Commercial Dynamics Pty. Ltd. | chlorine.
NSW, Australia |
------------------------------
Date: Wed, 1 Dec 1999 21:59:14 -0000
From: "Caesar" <julius_mong@hotmail.com>
Subject: Regular Expression Problem...
Message-Id: <8245ot$6m0$1@oyez.ccc.nottingham.ac.uk>
Dear Dan, I've got the array problem sorted but could you help me with this
one... I'm trying to make sure $value only contains CSS2 lengths, eg, 2.5in,
23cm, 930, -443, -45%, +23%, 34%, etc... but not 2.5ind, d-234%, 34%w,
34-35, etc... I'm now using the following regexp in Perl, but it doesn't
quite recognise the invalid patterns above and will not run dum dee dum...
if ($value =~ /\b[+|-]*[0-9]+[em|ex|px|pt|pc|cm|mm|in|%]{0,1}\b/) {...bla
bla bla...}
else {...dum dee dum...}
What am I doing wrong?
Thanks,
Jules
***24 hours in a day...24 beers in a case...coincidence?***
------------------------------
Date: Wed, 1 Dec 1999 22:00:48 -0000
From: "Caesar" <julius_mong@hotmail.com>
Subject: Regular Expression Problem
Message-Id: <8245r4$6of$1@oyez.ccc.nottingham.ac.uk>
Dear all, I've got the array problem sorted but could you help me with this
one... I'm trying to make sure $value only contains CSS2 lengths, eg, 2.5in,
23cm, 930, -443, -45%, +23%, 34%, etc... but not 2.5ind, d-234%, 34%w,
34-35, etc... I'm now using the following regexp in Perl, but it doesn't
quite recognise the invalid patterns above and will not run dum dee dum...
if ($value =~ /\b[+|-]*[0-9]+[em|ex|px|pt|pc|cm|mm|in|%]{0,1}\b/) {...bla
bla bla...}
else {...dum dee dum...}
What am I doing wrong?
Thanks,
Jules
***24 hours in a day...24 beers in a case...coincidence?***
------------------------------
Date: 01 Dec 1999 15:23:48 -0700
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Regular Expression Problem
Message-Id: <xkfu2m2e1vv.fsf@valdemar.col.hp.com>
"Caesar" <julius_mong@hotmail.com> writes:
> if ($value =~ /\b[+|-]*[0-9]+[em|ex|px|pt|pc|cm|mm|in|%]{0,1}\b/)
^^^^^
This is the only place you used the '[]' brackets correctly. You
probably want '()' elsewhere. Look up perlre to see why.
> What am I doing wrong?
Besides not checking the manpages, and posting the same thing twice, you
mean?
-=Eric
--
"Cutting the space budget really restores my faith in humanity. It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation."
-- Johnny Hart
------------------------------
Date: Wed, 01 Dec 1999 21:12:32 +0100
From: Alex Farber <alex@kawo2.rwth-aachen.de>
Subject: Re: russian perl-zine
Message-Id: <38458130.ACDC7F9D@kawo2.rwth-aachen.de>
Ilya Zakharevich wrote:
> The word REx has a silent 'p' at the end. (Noticed on KOI8 page.)
Not in jfriedl's regex-book!
/Alex
------------------------------
Date: Wed, 01 Dec 1999 21:02:46 GMT
From: toni@dse.nl
Subject: Re: Safe regular expressions
Message-Id: <8242dj$uqn$1@nnrp1.deja.com>
In article <m1r9h83m0r.fsf@halfdome.holdit.com>,
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
> >>>>> "toni" == toni <toni@dse.nl> writes:
>
> toni> I want to wo write a perl script where it must be possible for
the
> toni> user to enter a string, and the perl script will check wether or
> toni> not not data will contain that string.
>
> toni> I came with the following solution:
>
> toni> $data =~ /$user_input/is;
>
> toni> I think the user can now corrupt my program by entering
characters
> toni> like /({ etc.
>
> Nope. Not unless that code is inside an eval-string. Perl is
> not the shell. :)
Ok, thanks for your information so far, but when for example:
$user_input = 'Yes ( this is stupid';
Will generate this error:
/Yes ( this is stupid/: unmatched () in regexp
And the program aborts, I want to give the user the posibility
to correct the regular expression.
So I want to catch or correct the regular expression.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 01 Dec 1999 12:12:15 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: sample mail pipe
Message-Id: <3845811F.C8928EFA@mail.cor.epa.gov>
andrew wrote:
>
> Could someone email or post a perl program that's piped to from the aliases
> file?
I'm sorry, but it is really unclear what you want. Do you want
to know how to use the alias file when you use Perl to email
someone? Can't you just open() the alias file, read it in, and
make the substitution?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 1 Dec 1999 21:37:16 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: sample mail pipe
Message-Id: <8244ec$fpt$1@gellyfish.btinternet.com>
On Wed, 01 Dec 1999 14:43:31 GMT andrew wrote:
> Could someone email or post a perl program that's piped to from the aliases
> file?
>
#!/usr/bin/perl -w
use strict;
use Mail::Header;
my $header = Mail::Header->new(\*STDIN);
open (OUT,">>/tmp/test") || die "Cant open mtest to open - $!\n";
my $time=localtime();
print OUT $time,':',$header->get('From'),"\n";
close OUT;
All you need is a program that reads from STDIN and does whatever it wnats
with it - I'm not quite sure why you need an example as you dont tell us
what you want to do.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 01 Dec 1999 22:38:29 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: sample mail pipe
Message-Id: <Frh14.252$JO3.3602@nsw.nnrp.telstra.net>
On Wed, 01 Dec 1999 14:43:31 GMT,
andrew <andrew@fandom.net> wrote:
> Could someone email or post a perl program that's piped to from the
> aliases file?
In unix, a pipe connects stdout of one program to stdin of another. In
the case of an aliases file entry, your program will need to read from
stdin, where the complete message will be coming in. I'd suggext you
use one of the modules on CPAN to actually process the message.
Martien
--
Martien Verbruggen |
Interactive Media Division | Failure is not an option. It comes
Commercial Dynamics Pty. Ltd. | bundled with your Microsoft product.
NSW, Australia |
------------------------------
Date: Wed, 01 Dec 1999 12:47:14 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Send a website visitor an email based on visitors IP
Message-Id: <38458952.966E151C@mail.cor.epa.gov>
george1645@my-deja.com wrote:
>
> My intent is that email only be sent to users
> accessing a particular page on my site. A page
> which will require registration to access and
> will clearly state that an automated email will
> be sent out on each visit. It is NOT an attempt
> to spam anyone.
Okay, that's legit. But it is different from the impression
conveyed by your first post. The best thing to do is to
ask for the user's email address. Then ask them to type it
again. Then check that the two strings are the same,
otherwise they made a typo and they should re-enter. You
may also want to give them an option of skipping the email
reply. People may appreciate that.
It is my understanding that some
> scripts convert the dynamic IP to an email
> address and generate the email from that
> information. That the the script I am trying to
> locate. Thank you,
There is no such script. In fact, if you think about the
different protocols involved, you'll see that there is no
possible way to get that info. A dynamic IP address is
info about the connection via the browser. It may be
spoofed, it may be a proxy [as for all AOLers], or it may
not be provided. Even if you *could* get info back
[as some programs do by looking at the very suspect
HTTP_REFERER variable], that is not necessarily going to
be an email address. In fact it may be something else
most of the time. Even if you can snag a legal email
address, it may not be the address where they prefer
to get email.
The CGI Programming FAQ talks about this.. and says
"Do not do this!"
Just ask them for their e-mail address.
> George
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
s/buy/think/;
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 01 Dec 1999 11:20:17 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Sending email
Message-Id: <384574F1.653305DB@mail.cor.epa.gov>
Robin Robin Southgate wrote:
>
> Hello world,
Hmph. I'm not that fat. :-)
> I need a perl CGI script that will send a pre-written email at a
> specified time.
That would mean you would have to maintain the state of your
web process for *hours*. You don't want to do that.
> Or is just a question of using a normal email sending script and getting
> say task manager (win98) to run the perl program at a certain time?
That's one way. But read the Perl FAQ and the ActivePerl FAQ
for ways to send mail. Those suggestions are better than the
standard written-by-God-only-knows-how-incompetent CGI mail
programs floating about the Internet.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 01 Dec 1999 11:32:51 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Sending mail
Message-Id: <384577E3.3FD10A1D@mail.cor.epa.gov>
cosmosinternational@my-deja.com wrote:
>
> In article <822n5k$v55$1@nnrp1.deja.com>,
> brianb@evoserve.com wrote:
> > What's the best way to send email from a Perl script, specifically, an
> > Embperl page running under mod_perl?
> There is are 2 ways to access send e-mail in perl (that I know of).
There are lots of ways to do it.
> One is the UNIX - Sendmail and the other is <a
> href="http://www.webjump.com/web_resources/tutorials/tut_formmail.html">
> Formmail</a>
That second option is not viable for Apache and mod_perl.
And it doesn't look all that good from what little I saw.
That's why you're usually better off referring people to the
*good* answers in the FAQ. The Perl FAQ covers this, as well
as the ActivePerl [win32] FAQ (which has some suggestions
which are not OS-specific).
Mail::Mailer and Mail::Sender may be the best options if the
querent doesn't or can't access sendmail directly. Net::SMTP
is yet another way. There are more.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 01 Dec 1999 22:56:21 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Setting umask
Message-Id: <pIh14.317$JO3.3602@nsw.nnrp.telstra.net>
On Tue, 30 Nov 1999 16:14:32 -0500,
Burton Kent <burton@REMOVETHIS.lucent.com> wrote:
> I'm trying to set the umask for the environment using
> system "/bin/umask", "a=rw,g=rw,o=rw" or die "Couldn\'t set umask\n";
> also
> `/bin/umask a=rw,g=rw,o=rw`;
>
> This does not prevent files from being written as read only.
>
> Suggestions?
Yes. Read the FAQ first:
# perldoc -q environment | grep =head
=head1 Found in /usr/local/lib/perl5/5.00502/pod/perlfaq8.pod
=head2 I {changed directory, modified my environment} in a perl
script. How come the change disappeared when I exited the script?
How do I get my changes to be visible?
Then read about the umask function in perlfunc
# perldoc perlfunc
or
# perldoc -f umask
Martien
--
Martien Verbruggen |
Interactive Media Division | Little girls, like butterflies, need
Commercial Dynamics Pty. Ltd. | no excuse - Lazarus Long
NSW, Australia |
------------------------------
Date: Wed, 01 Dec 1999 19:26:22 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: shopping cart with Perl
Message-Id: <yDe14.664$3N2.165419@news.shore.net>
Andrey <andrey@cs.wayne.edu> wrote:
: Hello,
: Has anyone done a shopping cart in Perl?
Yes.
: What would be the best way to
: tie the cart to the session (and the user)? Would remote_ip+time work?
I guess it *might* work, but I've always relied on hidden fields (in an
HTML form) or setting a cookie. Those are the simplest methods.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Tue, 30 Nov 1999 12:59:14 +0530
From: Rajasankar K <kraja@miel.mot.com>
Subject: Single quotes Vs. Double quotes
Message-Id: <38437CCA.5FF75F2C@miel.mot.com>
Hello,
Where there is no need of interpolation,
Will enclosing a string in single quotes instead of double quotes increase the
speed ?
Regards,
Raja.
------------------------------
Date: Wed, 1 Dec 1999 14:06:03 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Single quotes Vs. Double quotes
Message-Id: <MPG.12af3baa4c8be43a98a2c6@nntp.hpl.hp.com>
In article <38437CCA.5FF75F2C@miel.mot.com> on Tue, 30 Nov 1999 12:59:14
+0530, Rajasankar K <kraja@miel.mot.com> says...
> Where there is no need of interpolation,
> Will enclosing a string in single quotes instead of double quotes increase the
> speed ?
Not that you would ever notice, because it takes place at compile time
and is trivial.
However, many of us (myself included) think that it increases clarity.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 01 Dec 1999 11:36:10 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: sockets/winsock.pm
Message-Id: <384578AA.1C974EAA@mail.cor.epa.gov>
Bart Lateur wrote:
> dave fleet wrote:
> >I'm trying to fins the winsock.pm module.
>
> Sounds like Win32 to me. Try <www.activestate.com/packages/zips>.
Winsock *is* win32. But if you look at ActiveState you find...
Nada! That's right, as people have been telling this guy all
week, there is no winsock.pm module. But he won't take our
word for it.
I think this is his company's programming equivalent of hazing the
new kid by sending him out for a left-handed crescent wrench.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 01 Dec 1999 22:48:50 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Source Code Open Season (was Re: Devoo.com : source code search engine)
Message-Id: <mBh14.285$JO3.3602@nsw.nnrp.telstra.net>
On Wed, 01 Dec 1999 10:23:26 GMT,
Bart Lateur <bart.lateur@skynet.be> wrote:
> xxaxx@my-deja.com wrote:
>
> >> The Extropia stuff is Selena Sol:
> >>
> >> '$! = 1 ; turn off buffering'
> >>
> >> Enough said.
>
> >Could you explain at least partially what is wrong with using
> >this option?
>
> Wrong variable. It's $| not $! .
and 'turn' is not a Perl keyword :), but I suspect that may have been
a loss of a '#' somewhere along the line.
Martien
--
Martien Verbruggen |
Interactive Media Division |
Commercial Dynamics Pty. Ltd. | Curiouser and curiouser, said Alice.
NSW, Australia |
------------------------------
Date: Wed, 01 Dec 1999 19:56:49 GMT
From: brianschilds@my-deja.com
Subject: Re: The Man Who Loved Numbers
Message-Id: <823uhu$rpb$1@nnrp1.deja.com>
> Shame on all of you, except Abigail.
Anyone who's studied Math beyond high school should instantly know this
was merely a parody on Paul Hoffmans book "The man who loved only
numbers" a biography of Paul Erdos, "The Most Prolific Mathematician
Who Ever Lived" end quote.
Erdos(1913-1996) would no doubt shake his head at my ridiculous
observation.
However he would never call 0(zero) merely a "filler", try dividing any
number, odd, even,prime or super prime by zero, all hell breaks loose!!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 01 Dec 1999 20:15:05 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: The Man Who Loved Numbers
Message-Id: <s4b0e9pfa5o78@corp.supernews.com>
upnorth@freeway.net wrote:
: Recently, we all noticed the date had some significance. It was
: 11/19/1999,all odd numbers. The next time that will occur is
: 11/11/3111, of course that correctly assumes that 0(zero) is an even
: number.
No need to assume; 0 % 2 == 0, hence 0 is even. Your proposed date is the
next all-odds date iff you use zero-padded day and month numbers; if you
don't zero-pad, it's 1/1/3111.
: Next year we'll be blessed with another impressive date,
: 02/02/2000,exactly even, the last time that the occurred was 08/28/888.
: Does this mean anything at all?
Yes, that we all have far too much time on our hands. :)
By the way, I still fondly recall celebrating Ascending Sequence Day with
my protogeek friends at 12:34 pm on 5/6/78.
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "Buy and sell 'your soul' and millions of
other items at eBay" - dogpile.com
------------------------------
Date: Wed, 01 Dec 1999 20:18:14 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: The Man Who Loved Numbers
Message-Id: <s4b0k6poa5o113@corp.supernews.com>
Erik van Roode (newsposter@cthulhu.demon.nl) wrote:
: upnorth@freeway.net wrote:
: > It was 11/19/1999,all odd numbers. The next time that will occur is
: > 11/11/3111
:
: Am I missing something? How about 11/21/1999, aren't those not
: all odd numbers?
It's being expressed sloppily; actual intent is "composed entirely of
digits which are odd." That is, 11/21/1999 is treated as qw(1 1 2 1 1 9 9
9), which contains an even digit and thus does not qualify.
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "Buy and sell 'your soul' and millions of
other items at eBay" - dogpile.com
------------------------------
Date: 01 Dec 1999 15:59:42 -0500
From: Scott Lanning <slanning@bu.edu>
Subject: Re: The Man Who Loved Numbers
Message-Id: <kusn1runzr5.fsf@buphy.bu.edu>
cberry@cinenet.net (Craig Berry) writes:
> By the way, I still fondly recall celebrating Ascending Sequence Day
> with my protogeek friends at 12:34 pm on 5/6/78.
Where were your friends at 23:45 on 6/7/89?
------------------------------
Date: 1 Dec 1999 15:27:09 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: The Man Who Loved Numbers
Message-Id: <slrn84b4r7.m2v.abigail@alexandra.delanet.com>
Larry Rosler (lr@hpl.hp.com) wrote on MMCCLXXXIII September MCMXCIII in
<URL:news:MPG.12aef5bcba220fb898a2c2@nntp.hpl.hp.com>:
##
## It was more stupid than that -- all odd digits. Otherwise, the next
## time would be 1/1/2001, which is much, much sooner than 11/11/3111
Actually, the next time that would occur after 19/11/1999 was 21/11/1999.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 01 Dec 1999 12:08:22 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Updated Llama (was Re: Looking for a good Perl Book)
Message-Id: <m13dtmo24p.fsf_-_@halfdome.holdit.com>
>>>>> "Herman" == Herman Stocker <hstocker@worldnet.att.net> writes:
Herman> My 2 - After 20+ years programming - I find that "Learning
Herman> PERL" books to be less then it could be! "Learning PERL"
Herman> assumes that the reader has worked with Unix, scripting and
Herman> has programmed in C. This is not the best thing to do for a
Herman> first book.
The next Llama version does not assume C. Trust me on this. In fact,
I may just mention C only in passing. :)
And the dependence on "must already know programming" is eliminated as
much as practical, but not made overcutesy to turn off Real
Programmers.
The outline also looks only about 60% like it does now. It's time to
retune the Llama to the *new* center of the market, not the center of
the market in 1993 (or the illfated attempt to do this in 1997).
Since the Llama often outsells the Camel, you can bet that both
O'Reilly and I are keeping all this as our top priority.
Please don't ask me about schedules. Schedules. I hate schedules,
and I can't talk about them anyway. Suffice to say "no release in the
next five months", so keep buying the old one so that I can pay the
bills, and the new one will be worth the wait. :)
print "Just another Perl book hacker,"
--
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: Wed, 01 Dec 1999 12:33:06 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Urgent - Executing a Perl program from another perl program
Message-Id: <38458602.472D5786@mail.cor.epa.gov>
Nico Zigouras wrote:
>
> my $did_it_execute = `perl previous_script.pl`;
>
> just have previous_script.pl print 1 if it executes correctly.
Ick.
Why not use system() and the $? variable?
perldoc -f system
perldoc perlvar [to read about $? ]
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 30 Nov 1999 14:10:51 -0500
From: <sterling@udhcp123.zk3.dec.com>
To: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: variable in regex
Message-Id: <Pine.LNX.4.10.9911301408340.797-100000@udhcp123.zk3.dec.com>
This is legal to do. Maybe this will help illustrate
$var = 'perl';
if ($var =~ /$var/) {
print "yippee\n";
} # if
On Wed, 1 Dec 1999, Alex Rhomberg wrote:
> Soetjianto wrote:
> >
> > Is it possible to use variable in regex?
> >
> > E.g.
> > $var = 'perl';
> > /$var/;
> check =~ in the perlop manpage
> - Alex
>
>
------------------------------
Date: Wed, 01 Dec 1999 12:15:09 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: variable in regex
Message-Id: <384581CD.D174FB97@mail.cor.epa.gov>
Soetjianto wrote:
>
> I am a fresh newbie. How do I check something in the perlop manpage?
Since you're posting this from Microsoft Lookout! Express, I'll
assume you use a win32 box. Get a copy of ActiveState Perl from
www.activestate.com if youhaven't already done so. It will
install the docs on your hard drive too. Then you can either
go to a command prompt and use the perldoc program, or else
go to your Start Menu and look at the Perl docs in your favorite
browser. Either way will let you read perlop and all the other
Perl pages.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 1 Dec 1999 20:51:39 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Winsock Problem with TCP Port 13
Message-Id: <8241or$fil$1@gellyfish.btinternet.com>
On Wed, 01 Dec 1999 16:15:31 +0100 Andreas Wahlet wrote:
> Hi,
>
> the following script get the daytime from the "daytime port 13" on a Win
> NT Server.
> The socket "$remote" is defined on server_a and the connection is ok.
> But on server_b the connection failed.
> The "services" - file is o.k.
> What's wrong? There are any Services that must be run? Or is it a
> Service Pack or a dll Problem?
>
I dont think that NT has a daytime service.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 01 Dec 1999 22:36:29 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Winsock Problem with TCP Port 13
Message-Id: <Nph14.247$JO3.3602@nsw.nnrp.telstra.net>
On Wed, 01 Dec 1999 16:15:31 +0100,
Andreas Wahlet <andreas.wahlert@ffm2.siemens.de> wrote:
> Hi,
>
> the following script get the daytime from the "daytime port 13" on a Win
> NT Server.
> The socket "$remote" is defined on server_a and the connection is ok.
> But on server_b the connection failed.
If it works for one server, but not for another, then there is no
problem with your perl script.
What happens if you use other tools to connect to those ports? Doesn't
this NT service come with client programs as well?
> The "services" - file is o.k.
That's what you say, but is that really true? There must be some
difference between the two servers? Since it is NT, did you remember
to reboot after moving your mouse? :)
> What's wrong? There are any Services that must be run? Or is it a
> Service Pack or a dll Problem?
I don't know. That has hardly any relevance to Perl, has it? Maybe you
should try to ask on an NT specific group.
Martien
--
Martien Verbruggen |
Interactive Media Division | The world is complex; sendmail.cf
Commercial Dynamics Pty. Ltd. | reflects this.
NSW, Australia |
------------------------------
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 1541
**************************************