[12065] in Perl-Users-Digest
Perl-Users Digest, Issue: 5665 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 14 17:07:14 1999
Date: Fri, 14 May 99 14:00:19 -0700
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, 14 May 1999 Volume: 8 Number: 5665
Today's topics:
Re: Controlling a Modem with Perl in Win32 <swarren@www.wwwdotorg.org>
Re: dynamically change setuid <dhenders@cpsgroup.com>
encoding query strings manually? <ksanders@sandnarrows.com>
Re: FAQ 4.14: How can I find the Julian Day? (Larry Rosler)
Re: FAQ 4.21: How do I find matching/nesting anything? <ebohlman@netcom.com>
Re: FLOCK and Win 9x <upsetter@ziplink.net>
Help with ActiveState Perl Debugger Installation <sattlerc@cig.mot.com>
How to share vars across files? <jalil@corp.home.net>
Re: indentionless here document ? (<<-) <swarren@www.wwwdotorg.org>
mirror.pl not working on BSD (Chris Chubb)
Re: Off-topic: France (was Re: Perl "constructors") <aqumsieh@matrox.com>
Re: Ok, here I go... Help! (2 "a"'s in aardvarkhill lin <bruce@pond.net>
Ok, here I go... Help! <bruce@pond.net>
Re: password checking <aqumsieh@matrox.com>
Sending E-Mail via PERL (CGI) <webmaster@*nospam*mugomilk.freeserve.co.uk>
Re: SimNet - Perl proxy governor project (Charles R. Thompson)
Re: Simple Q: How to print the string aaa*bbbccc? <cassell@mail.cor.epa.gov>
Re: Simple Q: How to print the string aaa*bbbccc? (Bart Lateur)
Re: Small amount of Perl CGI script work needed for sit <dturley@pobox.com>
Re: Small amount of Perl CGI script work needed for sit (Mike Arndt)
Re: Sorting is too slow for finding top N keys... - GOT (Larry Rosler)
string manipulation with form submissions <vinh.bui@medstat.com>
Re: Using cmp on data fetched via Odbc <ebohlman@netcom.com>
Re: Where to find more information on PERL. <cassell@mail.cor.epa.gov>
Re: Where to find more information on PERL. <cassell@mail.cor.epa.gov>
Re: Where to find more information on PERL. <ebohlman@netcom.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 14 May 1999 20:30:23 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Controlling a Modem with Perl in Win32
Message-Id: <zJ%_2.1191$6x6.1790@news.rdc1.sfba.home.com>
Mark D. Crockett, MD <crockett@uic.edu> wrote in message
news:7hhceu$156g$1@piglet.cc.uic.edu...
> Does anyone have experience controlling a modem with Perl in Win32?
Experience, no. However, the latest issue of The Perl Journal discusses
this. You might find it on a local news-stand, or order from
http://www.tpj.com/
The basics: Use the modules Win32::SerialPort, Win32API::CommPort and
Win32::API, all available from CPAN (http://www.perl/com/CPAN)
> I.E. to
> fire off a page using a modem from a web application?
Hmmm. Not sure what you mean by this...
--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com http://www.techhouse.com/
mailto:swarren@wwwdotorg.org http://www.wwwdotorg.org/
MIME, S/MIME and HTML mail are acceptable
------------------------------
Date: 14 May 1999 14:36:25 -0500
From: Dale Henderson <dhenders@cpsgroup.com>
Subject: Re: dynamically change setuid
Message-Id: <87ogjnv3ye.fsf@camel.cpsgroup.com>
>>>>> "neal" == neal <neal@make-a-store.com> writes:
neal> I want to write a program which dynamically changes the
neal> setuid based on parameters. Kinda like cgiwrap. ie myprog.pl
neal> user=neal, myprog.pl user=joeblow
neal> Is this possible? I've successfull written a c wrapper to
neal> make a program setuid -but that involves compiling and
neal> changing permissions. I want to be able to do this on the
neal> fly.
neal> Any ideas?
man perlvar
specifically look for $<, $>, $(, $)
or for the C side
man setreuid
neal> -----------== Posted via Deja News, The Discussion Network
neal> ==---------- http://www.dejanews.com/ Search, Read, Discuss,
neal> or Start Your Own
------------------------------
Date: Sat, 08 May 1999 02:39:32 GMT
From: Ken <ksanders@sandnarrows.com>
Subject: encoding query strings manually?
Message-Id: <3733A53D.4057@sandnarrows.com>
Hello, I have been hunting the net for an answer to my question and have
yet to find anything so thought I might try here.
I wish to write in my perl a query string thats properly encoded.
Something like the following:
print "<a href="www.somewhere.com/newscript.pl?(query string)>"
where (query string) is the encoded value of a string that I have. I
have found lots of information on decoding and lots of information on
how a form encodes it, but I want to be able to encode it manually in my
perl script.
So convert something like: the blue hat!!! to a value that will be
acceptable as a query string. Converting the spaces to + is easy enough,
its the next stage of converting the symbols etc, that I have a problem
with.
Thanks for reading!
Ken
ksanders@sandnarrows.com
------------------------------
Date: Fri, 14 May 1999 13:30:50 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: FAQ 4.14: How can I find the Julian Day?
Message-Id: <MPG.11a627d1361e7cd4989a67@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <373C67BC.A89A2345@mail.cor.epa.gov> on Fri, 14 May 1999
11:13:16 -0700, David L. Cassell <cassell@mail.cor.epa.gov> says...
> Tom Christiansen wrote:
> >
> > (This excerpt from perlfaq4 - Data Manipulation
> > ($Revision: 1.46 $, $Date: 1999/04/20 18:59:53 $)
> > part of the standard set of documentation included with every
> > valid Perl distribution, like the one on your system.
> > See also http://language.perl.com/newdocs/pod/perlfaq4.html
> > if your negligent system adminstrator has been remiss in his duties.)
> >
> > How can I find the Julian Day?
> >
> > Neither Date::Manip nor Date::Calc deal with Julian days. Instead,
> > there is an example of Julian date calculation that should help you
> > in
> > http://www.perl.com/CPAN/authors/David_Muir_Sharnoff/modules/Time/J
> > ulianDay.pm.gz .
>
> But before you immerse yourself too deeply in this, be sure to
> verify that it is the *Julian* Day you really want. There is too
> much confusion on this issue to cover in this FAQ. But the term is
> applied (correctly) to a calendar now supplanted by the Gregorian
> Calendar, with the Julian Calendar failing to adjust properly for
> leap years on centennial years (among other annoyances). The term
> is also used (incorrectly) to mean: [1] days in the Gregorian
> Calendar; and [2] days since a particular starting time or `epoch',
> usually 1970 in the Unix world and 1980 in the MS-DOS/Windows world.
> If you find that it is not the first meaning that you really want,
> then check out the Date::Manip and Date::Calc modules.
Subject: Re: FAQ 4.14: How can I find the Julian Day?
Date: 1999/04/22
Author: David Cassell <cassell@mail.cor.epa.gov>
...
Okay, I've seen this request several times in this newsgroup since, say,
February. Are these people *really* interested in this, or do you think
the problem is that they don't understand what the Julian Day really is?
Are they really just interested in a way of getting serial days so that
they can do date arithmetic? If so, then are we doing them a disservice
by not pointing out the issue? Something like:
If you are interested in performing date arithmetic, this can
be done using either Date::Manip or Date::Calc, without converting to
Julian Day first.
Just wondering,
David
***
Methinks you are looping along with the FAQ reposts, David. :-)
You are wrong about the origin of 'Julian' in 'Julian Day'. According
to the (somewhat authoritative?) sources I have found, it has little or
nothing to do with the Julian calendar.
<URL:http://darkstar.swsc.k12.ar.us/~izzy/julian.html>
An Explanation of the Julian Day Numbering System
...
The system was begun by a man named Joseph Scaliger in 1582. At that
time, the world was switching from the Julian Calendar to the Gregorian
Calendar. Scaliger's new system actually had nothing to do with either
one; it was named after his father. The belief nevertheless persists,
and it is difficult even to this day to separate the Julian Calendar
(now outdated) from the Julian Day System.
...
<URL:http://zorro.ruca.ua.ac.be/~s965042/jdl.htm>
Julian Day Numbers
...
The Julian Day number system was invented by Joseph Justus Scaliger
(born 1540-08-05 J in Agen, France, died 1609-01-21 J in Leiden,
Holland), who during his life immersed himself in Greek, Latin, Persian
and Jewish literature. His invention (in 1583) of the Julian day number
system is considered by some the foundation of the science of
chronology.
Although the term Julian Calendar derives from the name of Julius
Caesar, the term Julian day number probably does not. Most say that this
system was named, not after Julius Caesar, but after its inventor's
father, Julius Caesar Scaliger (1484-1558). Perhaps it was simply named
after the Julian Calendar.
...
>From the same source, worth reiterating (as I posted in *my* last turn
through this loop. ObPerl: This refers to the $yday return value of
(gm|local)time and the '%j' specifier of POSIX::strftime()):
The system of Julian days should not be confused with the simpler system
of the same name which associates a date with the number of days elapsed
since January 1st of the same year (according to which 2000-12-31 is day
366 of the year 2000).
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 14 May 1999 19:38:52 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: FAQ 4.21: How do I find matching/nesting anything?
Message-Id: <ebohlmanFBqMKs.B3y@netcom.com>
Tom Christiansen <perlfaq-suggestions@perl.com> wrote:
: One simple destructive, inside-out approach that you might try is
: to pull out the smallest nesting parts one at a time:
: while (s//BEGIN((?:(?!BEGIN)(?!END).)*)END/gs) {
There seems to be at least one typo here.
: # do something with $1
: }
------------------------------
Date: Fri, 14 May 1999 19:28:08 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: FLOCK and Win 9x
Message-Id: <cP__2.367$9x5.106893@news.shore.net>
Bradley W. Langhorst <bwlang@genome.wi.mit.edu> wrote:
: you could try writing out a small lock file whenever youare writing to
: the real file.
: You would check for it's existence before writing and
This is a race condition. I believe you're better off having a permanent
lock file and not writing to the data file until you have an exclusive
lock on the lockfile.
: be sure to delete it after writing
There's no real reason to, and someone else could open and try to lock it
between the time you close the file and when you unlink it.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Fri, 14 May 1999 14:47:59 -0500
From: "Chris Sattler" <sattlerc@cig.mot.com>
Subject: Help with ActiveState Perl Debugger Installation
Message-Id: <7hhunv$35e4@nntp.cig.mot.com>
I've installed ActiveState Perl build #515 and a trial version of the
ActiveState Perl Developer's Kit. When I run perl -d it complains about not
being able to locate PerlDB.pl in @INC. Can anyone tell me how to set the
initial value for @INC that is used as the default when Perl first starts
up? I'm running on a Windows NT box.
------------------------------
Date: Fri, 14 May 1999 20:30:29 GMT
From: "Jalil Feghhi" <jalil@corp.home.net>
Subject: How to share vars across files?
Message-Id: <926713829.41844@zeppelin.svr.home.net>
I have a couple of perl files and need to share some vars across my files
(export them in one file and import it in another). I am using 'use strict'
in all my files.
Is there a way to do this?
Thanks,
-Jalil
------------------------------
Date: Fri, 14 May 1999 20:36:47 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: indentionless here document ? (<<-)
Message-Id: <zP%_2.1192$6x6.1770@news.rdc1.sfba.home.com>
Tom Christiansen <tchrist@mox.perl.com> wrote in message
news:373c3732@cs.colorado.edu...
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc, renenyffenegger@my-dejanews.com writes:
> :Is there any feature in perl to remove tabs at the
> :beginning of a line in a here document, similar
> :to the <<-EOHD in a shell script.
In fact, this very discussion was had in this newsgroup not more than a
day or two ago.
The answer lies in the FAQ (although some variations are also in the
recent news articles)
Read `perldoc perlfaq4`. "Why don't my <<HERE documents work?'
--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com http://www.techhouse.com/
mailto:swarren@wwwdotorg.org http://www.wwwdotorg.org/
MIME, S/MIME and HTML mail are acceptable
------------------------------
Date: Fri, 14 May 1999 20:19:53 GMT
From: chris@codegurus.com (Chris Chubb)
Subject: mirror.pl not working on BSD
Message-Id: <oy%_2.316$Ku4.16082@iad-read.news.verio.net>
I am having a heck of a time getting mirror.pl to work
under my BSD installation.
When I try to run it, I get the following message:
>Scanning local directory /mnt/web/guide/trafficcount/traffic/C1/
>Connecting to 206.67.51.151
>ERROR (Bad file descriptor) in chat'open_port() while connecting socket:
>connect(S, NC3). port=21, serveraddr=NC3, server=206.67.51.151
>Failed to connect
>Pausing between retries
(The ERROR line is my patch to lchat.pl)
Why would this be happening?
It does exactly the same thing if I have $using_socks set or not.
Why would I loose the 'S' filehandle mid stream?
The maddening thing is I think it worked and connected once,
but has not since then.
Specifics:
mirror 2.9
Perl 5.00402
BSD
------------------------------
Date: Fri, 14 May 1999 13:55:56 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Off-topic: France (was Re: Perl "constructors")
Message-Id: <x3yg14zo7rn.fsf@tigre.matrox.com>
Scratchie <upsetter@ziplink.net> writes:
> I once went to France with an (American) friend who couldn't understand
> why supermarkets sold bread in plastic bags that had little holes in them.
> "It would stay fresh a lot longer if they'd use a regular bag", he
> lamented.
I hope I am not being stupid here, but why do the bags have little
holes in them?
------------------------------
Date: Fri, 14 May 1999 13:28:04 -0700
From: "Bruce" <bruce@pond.net>
Subject: Re: Ok, here I go... Help! (2 "a"'s in aardvarkhill link!)
Message-Id: <GP__2.131$4R4.7001@news15.ispnews.com>
http://viper.thinairad.com/aardvarkhill/tell_a_friend_cgi.html
------------------------------
Date: Fri, 14 May 1999 13:08:24 -0700
From: "Bruce" <bruce@pond.net>
Subject: Ok, here I go... Help!
Message-Id: <XF__2.2313$O3.71384@news12.ispnews.com>
I should be sailing...
But instead, I've spent the last two weeks trying to get a simple perl
script to work! I actually want to install some CGI-World scripts and
thougth it would be good to get perl, make sure I could install it, and make
sure I could actually get something to run... (dumb idea! ;-) To whom ever
attempts to help me, thanks in advance, it will become appearent that I'm
pretty clueless on most of this. I've read lots of FAQ's and pages of
"stuff" but it is all just swimming around like a vortex... slowly but
surely drawing me down into the abyss!
After a few days of searching for a version of perl, that I could actually
install on my NT workstation (Web Development) and our NT Server (Live Web
server) I finnally found ActiveStates Active perl. I installed it, fine (two
days later I figured out that is wasn't really working yet... or was sort
of ) and fixed that... I can't get it installed on the Live Web Server (but
that Might just be because I've tried to run the install with web services
running).
So, I have this simple little page that I want to make work. I swiped
(stole? flattered?) it off of a site, www.echoecho.com, and downloaded
FormMail.pl from Matt's script archive. which it appears to require. I'm
not really sure if it needs "FormMail.pl" 26k or "mailform.pl/cgi" 6k. I've
tried pointing to both.
http://viper.thinairad.com/ardvarkhill/tell_a_friend_cgi.html
I want it to take in: My name, My e-mail address, My Message, and the e-mail
address of 3 friends. I then want it to e-mail a message from me to each of
my 3 friends, including a link back to the really great "aardvarkhill.com"
site. It would also be nice if it confirmed to me that all this had been
done by giving my browser the
http://viper.thinairad.com/aardvarkhill/tell_a_friend_confirm.html page
which is formatted but not working either.
I know that perl is working on my server, because I can run a "hello world"
test, at there browser that works. (with the pl extension,
http://viper.thinairad.com/aardvarkhill/cgi-bin/helloworld.pl )
When I try to use the form, (submit) it tries to open a file/download
"mailform.pl from viper.thinairad.com" If I change the extension to .cgi, it
returns an error saying that mailform.cgi is not a valid application. yet if
I open a command prompt window, or 2x click on the cgi version from the file
explorer, it will open a dos window, run the program correctly and then
close the window (this is very fast, but visible)
Also, at various attempts I've been able to generate some prel/script error
messages that appear to come from FormMail.pl. When I am able to get
something to work, I get a "recipient" not defined error, and I'm also not
at all sure if I have to have a mail server installed on my machine or on
our live server for this to work. One of the readme's tells me:
"First, make sure you have DevMailer 1.0. This can be downloaded for free
from Geocel International, at: http://www.geocel.com/devmailer/"
But it doesn't say why I need it, or what it does. It also is $99 "free!"
;-)
Anyway, that should be enough to let someone who knows something see how
much I don't know!
I cast myself upon the waters of perl-dom!
Thanks much,
Bruce Searl
Thin Air Advertising & Design
541-686-1279
bruce@thinairad.com
------------------------------
Date: Fri, 14 May 1999 13:58:02 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: password checking
Message-Id: <x3yemkjo7o5.fsf@tigre.matrox.com>
pontz@channel1.com (Brian) writes:
> Ok Thanks ....But the nice indenting still didnt make it work.
Did you try to fix the other (more serious) problems though?
> On Thu, 13 May 1999 00:49:49 -0400, rjk@linguist.dartmouth.edu (Ronald
> J Kimball) wrote:
[snip]
> >I see at least three things wrong with this sub:
> >The indenting is atrocious.
> >You misspelled 'Password' in 'htCheckPassword'.
> >You do a 'next' even though you don't appear to be in a loop.
------------------------------
Date: Fri, 14 May 1999 21:55:37 +0100
From: "Mug-O-Milk" <webmaster@*nospam*mugomilk.freeserve.co.uk>
Subject: Sending E-Mail via PERL (CGI)
Message-Id: <7hi2nu$rpc$1@news6.svr.pol.co.uk>
Thanks for the last advice, that worked brilliantly :O)
--> However, clients as they do, have thought of other "wants" or "could
you..'s"
How do you send E-Mail (i.e. a confirmation e-mail) using Perl?
I'm semi new to perl, so a list of commands would be fine, as I don't
understand it in me LLAMA book :O(
Thanks in Advance!
------------------------------
Date: Fri, 14 May 1999 19:04:52 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: SimNet - Perl proxy governor project
Message-Id: <MPG.11a63f34c9fba6ce9896c7@news>
[ Congratulations, Randal L. Schwartz you could be a winner! Return to
comp.lang.perl.misc to claim your prize. ]
In article <m1btfn5z4m.fsf@halfdome.holdit.com>, Randal L. Schwartz
says...
> You could base it on a combination of work I've already done for my
> WebTechniques columns... in particular, I have a throttling CGI, and a
> pre-forking web-proxy-server... you'd just need to combine the two. :)
> My columns are online (thank you Miller Freeman!) at
>
> http://www.stonehenge.com/merlyn/WebTechniques/
Good to see it is possible. I had a feeling it wasn't anything too
incredibly original. In the least, I was certain somebody had probably
gotten real close.
I'd been through your site earlier this week and seemed to have missed
that whole section! (Musta been all the other neat stuff to look at that
distracted me).
--
CT
------------------------------
Date: Fri, 14 May 1999 12:23:25 -0700
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: Simple Q: How to print the string aaa*bbbccc?
Message-Id: <373C782D.BC000308@mail.cor.epa.gov>
Tom Ashbrook wrote:
>
> I have tried double quotes, single quotes, and \ but I get an error saying
> that I am missing a semicolon or an operator before *bbbccc.
>
> It's soooo simple but i have a brain fart i guess.
Well, you must be doing something odd, because you *should*
be able to do it with any of:
single quotes
double quotes and \
the quotemeta function
Try this [assuming you're on win32]:
perl -e "print 'aaa*bbbcc';"
or this:
perl -e "print q(aaa*bbbcc);"
or this:
perl -e "print qq(aaa\*bbbcc);"
HTH,
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 14 May 1999 19:46:08 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Simple Q: How to print the string aaa*bbbccc?
Message-Id: <373d7c23.1743868@news.skynet.be>
David L. Cassell wrote:
>
>Well, you must be doing something odd, because you *should*
>be able to do it with any of:
>
>the quotemeta function
SAY WHAT?
This function takes a string, and puts a backslash in front of every
non-word character. I entirely fail to see how it could be used in any
way for this purpose. You still need to put quotes around the
characters.
One can use q() and qq(), of course.
print q(aaa*bbbccc); # comparable to ''
print q!aaa*bbbccc!; # different delimiters (example)
print qq(aaa*bbbccc); # comparable to ""
Bart.
------------------------------
Date: Fri, 14 May 1999 18:52:29 GMT
From: David Turley <dturley@pobox.com>
Subject: Re: Small amount of Perl CGI script work needed for site.
Message-Id: <7hhrdc$k4m$1@nnrp1.deja.com>
In article <373c5cba@newsbox.grin.net>,
webmaster@film.tierranet.com (Mike Arndt) wrote:
> Hello,
>
> I'm interested to know if anyone can program a Perl CGI which can do
the
> following.
>
> <form action=cgiscript.cgi8>
> <input type=text name="SV-4000W" size=14 VALUE="enter e-mail"><br>
> <input type=button value="Send Info"></form>
>
> Let's say this script existed on a web page called
> http://www.example/products/product1234.html
>
> I'd like the user to input their friends e-mail address and the friend
would
> receive an e-mail that reads as follows:
>
You mean so I could write perl script to use your site to spam people?
Cool!
--
David Turley
dturley@pobox.com
http://www.binary.net/dturley
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Fri, 14 May 1999 19:59:49 GMT
From: webmaster@film.tierranet.com (Mike Arndt)
Subject: Re: Small amount of Perl CGI script work needed for site.
Message-Id: <373c8144@newsbox.grin.net>
In article <7hhrdc$k4m$1@nnrp1.deja.com>, David Turley <dturley@pobox.com> wrote:
>In article <373c5cba@newsbox.grin.net>,
> webmaster@film.tierranet.com (Mike Arndt) wrote:
>> Hello,
>>
>> I'm interested to know if anyone can program a Perl CGI which can do
>the
>> following.
>
>>
>> <form action=cgiscript.cgi8>
>> <input type=text name="SV-4000W" size=14 VALUE="enter e-mail"><br>
>> <input type=button value="Send Info"></form>
>>
>> Let's say this script existed on a web page called
>> http://www.example/products/product1234.html
>>
>> I'd like the user to input their friends e-mail address and the friend
>would
>> receive an e-mail that reads as follows:
>>
>
>You mean so I could write perl script to use your site to spam people?
>Cool!
This would not be spam as it would simply be people wno know each other
alerting each other of products. Spam is generally defined as unsolicited
e-mail being sent to people. When two people know each other and e-mails are
sent to them because they have a relationship online it is not spam because it
is not unsolicited.
Perhaps if you took a look at the template I am developing at
http://film.tierranet.com/buc/product.html you might agree. I am also going to
look into developing an area online where users could input their e-mail
address to prevent them from receiving any further e-mails.
------------------------------
Date: Fri, 14 May 1999 12:33:14 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Sorting is too slow for finding top N keys... - GOT IT !
Message-Id: <MPG.11a61a557361f40a989a66@nntp.hpl.hp.com>
[I have no qualms about following up on my own post. But someonce
recently caught me mailing myself a courtesy copy out of habit. Not
this time. :-)]
In article <MPG.11a609c55e38f3db989a65@nntp.hpl.hp.com> on Fri, 14 May
1999 11:22:39 -0700, Larry Rosler <lr@hpl.hp.com> says...
...
> Now everything is clear, I hope. The extremum sorts (slice-and-sort)
> take much less clock time and much less I/O (swap) time, while using
> user time comparable to the sort() function (sort-and-slice).
>
> I will revise the description of extremes() to include this new
> understanding of the performance issues. What matters is the size of
> the data relative to the physical memory, not any pathological nature of
> the data.
Below is the revised description. Unless someone offers correction or
improvement, I'll ask Daniel Grisinger to update it in the Perl Function
Repository.
As for the competing performance claims of the other selection
algorithms offered in this thread, I'm a bit out of tuits to keep
comparing them, especially when I'm not sure this is the best approach
(compared to 'sort-and-slice') for other than humongous data sets.
I hope others have found this problem as instructuve as I have!
# extremes() returns the extreme N elements of a list or keys of a hash,
# sorted according to a specified criterion.
#
# The conventional algorithm uses a complete sort, sliced on the list
# output:
# (sort sort_sub LIST)[0 .. N - 1]
# Because the sort() function is implemented very efficiently using C,
# this 'sort-and-slice' algorithm is usually quite effective. If the
# number of elements being sorted is M, its average complexity is
# O(M log M), though pathological cases (such as nearly sorted data)
# may produce O(M**2) behavior.
#
# If N << M, the 'slice-and-sort' algorithm used by extremes() might be
# more efficient, O(M * N * log N), which is << O(M log M) -- except for
# the multiplicative constant on each. Therefore, because extremes()
# is implemented in Perl, the expected performance improvements may not
# be observed. Comparative benchmarking is suggested.
#
# Nevertheless, when M is very large, page-thrashing behavior may cause
# the sort() function to take extraordinarily long elapsed time, because
# of the expensive comparison probes into virtual memory. In such
# cases the 'slice-and-sort' algorithm may behave much better, because
# it compares each datum against a small comparison set in real memory.
#
# extremes(ref, n, num, max)
# ref = reference to array or hash
# n = maximum number of elements to return
# num = sort numeric if TRUE, sort lexicographic if FALSE
# max = maxima descending if TRUE, minima ascending if FALSE
#
# Trailing FALSE arguments may be omitted. More complex sorting
# comparisons may be done using a reference to a usual sorting
# subroutine as the third argument.
#
# The algorithm for this function, and an initial implementation, were
# presented originally by Michel Dalle, 8 May 1999.
#
# Larry Rosler, 14 May 1999
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 14 May 1999 19:25:21 GMT
From: Vinh T. Bui <vinh.bui@medstat.com>
Subject: string manipulation with form submissions
Message-Id: <7hhtau$ldn$1@nnrp1.deja.com>
I have a submission form with has a TEXTAREA. A user enters the
following:
line1
line2
line3
I want to write this value to a text file on only ONE line. However
when I read from this text file, the output will be in the same format
as the input. (kinda like how this submit form is set up) Any
suggestions?
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Fri, 14 May 1999 19:32:46 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Using cmp on data fetched via Odbc
Message-Id: <ebohlmanFBqMAM.AC3@netcom.com>
Trainham Bradford <Bradford.Trainham@m1.irs.gov> wrote:
: The indicator is defined in the database as a char of length 1.
: When I say:
: print "IRS badge required \n") if (($data{h_idind} cmp "X") == 0);
: I've made certain my test data does indeed contain an X in tha field, and
: by the resulting output of the program every other field is being processed
: correctly.
: Other than that I work for the IRS, what might I be doing wrong?
Trying to write a string comparison as if it were a Fortran II arithmetic
IF statement, for one...
Your little snippet of code won't even compile (odd number of parens), so
I very much doubt it's the actual code that's giving you the problem.
Please *cut and paste* (*not* retype) the actual code and enough of the
surrounding code to give it context. Before doing this, though, use the
debugger or some print statements to find out what's really in
$data{h_idind}.
------------------------------
Date: Fri, 14 May 1999 12:10:36 -0700
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
To: Teo Keng Boon <kbteo@bigfoot.com>
Subject: Re: Where to find more information on PERL.
Message-Id: <373C752C.778D6C38@mail.cor.epa.gov>
[courtesy cc to poster]
Teo Keng Boon wrote:
>
> Hi all,
>
> I am doing an assignment to make a comparison between different programming
> languages, such as C++, Java and Perl, etc. I am looking for information on
> their differences, features, applications, what they are good at, etc.
>
> Could anyone help by directing me to sources carrying these sources?
You could go to http://language.perl.com/versus/index.html
to see some comparisons. You might also look in the back of each
chapter of "Advanced Perl Programming" for some discussion on
how Perl compares to some other languages on specific features
covered in that chapter.
You might also bear in mind that 90% of what you will read on
the net is utter garbage. So prepare to spend some time eval-
uating whatever nonsense people try to feed you.
That includes this post, of course. :-)
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 14 May 1999 12:13:21 -0700
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: Where to find more information on PERL.
Message-Id: <373C75D1.8A2A5171@mail.cor.epa.gov>
Larry Rosler wrote:
>
> [Posted and a courtesy copy sent.]
>
> In article <7hh8o6$4lq$1@mango.singnet.com.sg> on Fri, 14 May 1999
> 21:25:43 +0800, Teo Keng Boon <kbteo@bigfoot.com> says...
> > I am doing an assignment to make a comparison between different programming
> > languages, such as C++, Java and Perl, etc. I am looking for information on
> > their differences, features, applications, what they are good at, etc.
> >
> > Could anyone help by directing me to sources carrying these sources?
>
> http://language.perl.com/versus/index.html
>
> Enjoy! (And attribute your sources properly in your report!)
"Plagiarize!
Remember why the good Lord made your eyes!
So don't shade your eyes,
just plagiarize, plagiarize, plagiarize!
... only remember always to call it.. research."
- Tom Lehrer (another strange mathematician)
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 14 May 1999 19:41:33 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Where to find more information on PERL.
Message-Id: <ebohlmanFBqMp9.BnK@netcom.com>
David L. Cassell <cassell@mail.cor.epa.gov> wrote:
: "Plagiarize!
Let no one else's work evade your eyes!
: Remember why the good Lord made your eyes!
: So don't shade your eyes,
: just plagiarize, plagiarize, plagiarize!
: ... only remember always to call it.. research."
^, please,
: - Tom Lehrer (another strange mathematician)
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5665
**************************************