[13499] in Perl-Users-Digest
Perl-Users Digest, Issue: 909 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 25 23:07:26 1999
Date: Sat, 25 Sep 1999 20:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <938315107-v9-i909@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 25 Sep 1999 Volume: 9 Number: 909
Today's topics:
ActivePerl, DCOM & Windows98 (Bert Blink)
Activestate on WIN98 error (James Ringrose)
Re: cookbook: nonforker <SternSZ@gmx.de>
Re: HELP Why does the perl CGI choke from '@' <syeates@manuka.cs.waikato.ac.nz>
Re: How to find the directory a script is running from <tchrist@mox.perl.com>
Re: How to find the directory a script is running from <tchrist@mox.perl.com>
Re: How to find the directory a script is running from (Abigail)
Re: injecting "my" varibales into caller's scope <pjl@be-NOSPAM-st.com>
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: injecting "my" varibales into caller's scope (Ilya Zakharevich)
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: injecting "my" varibales into caller's scope <dan@tuatha.sidhe.org>
Re: injecting "my" varibales into caller's scope (Abigail)
Re: Need a unique "ID" string (Ilya Zakharevich)
Re: Need a unique "ID" string <smiths@erols.com>
Re: Perl Cookbook Question <tchrist@mox.perl.com>
Re: PERL PROBLEM - ERROR 405 method not allowed (Abigail)
Re: rotating random banners 2 at a time <tchrist@mox.perl.com>
Re: weekly update suggestions <tchrist@mox.perl.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 26 Sep 1999 10:12:51 +1000
From: bblink@pcug.org.au (Bert Blink)
Subject: ActivePerl, DCOM & Windows98
Message-Id: <37ed63f0.10271799@newshost.pcug.org.au>
I have been trying to install ActicePerl but keep getting the message
"can't install ActivePerl as DCOM needs to be installed". Needless to
say this is a malicious lie.
I have Win98 SE installed & this comes with DCOM already installed.
Anyone know how to make the ActivePerl install realise its mistake? I
have been to nearly all the FAQ's & searched all the NewsGroups but no
mention seems to be made of install problems with Win98. I hope I am
not unique.
As far as I can tell the issue of whether DCOM is installed or not
appears to be treated differently depending on what Software you are
installing. VB6 claimed I didn't have it installed & said it would
install it for me & hence finally installed itself. Shortly after I
wanted to install Personal Web Server (PWS) & it would not install
because it claimed I didn't have DCOM installed. This was after VB6
claimed to have installed it & in spite of Win98 supposedly having it
already installed. Anyway I managed to find a site at Microsoft
having DCOM98 an upgrade for Win98. This I installed & much to my joy
PWS installed. BUT this still didn't help with ActivePerl install,
still claiming I don't have DCOM installed (how many different tests
for "is DCOM installed" are there?)
Can anyone help?
------------------------------
Date: Sat, 25 Sep 1999 21:42:59 -0400
From: james_Ringrose@msn.com (James Ringrose)
Subject: Activestate on WIN98 error
Message-Id: <MPG.1257442c1e57f428989681@netnews.msn.com>
Anyone had a problem with Activestate build 519 APi519e.exe on Win98?
My install completes up to about 90% on the "install gauge" at which
point the install program errors with INSO432.
PERL is installed and works, but ppm does not function, the package dat
file is missing, no path is added etc.
I have downloaded the the PACKAGE twice, cleaned up by deleting
everything and tried several times always with the same result.
P.S. uninstall.pl wont run.
Regards
James
------------------------------
Date: 26 Sep 1999 00:04:52 +0200
From: Benjamin Schweizer <SternSZ@gmx.de>
Subject: Re: cookbook: nonforker
Message-Id: <m3905uabqz.fsf@anthrax.local.net>
+-->Jonathan Stowe <gellyfish@gellyfish.com>:
| > I´ve upgraded my version from 5.005_2 to 5.005_3, but IO::Select
| > doesn´t include "has_exception". What´s going wrong; is IO::Select not
| > in the perl.rpm file?
|
| Have you tried installing Perl from the source ? We have no way of knowing
| that the package you installed is correct - on Linux there is no need to
| install pre-compiled binaries.
No, I´ve installed the package of my distribution (SuSE) from their
ftp-server.
cu
--
Holger Voss in de.soc.politik.deutschland: "Ich werde nach wie vor
"Ethik", "Gewissen" bzw. "Moral" - wie auch immer Du das nennen willst -
als Entscheidungsinstanz ansehen, und nicht die Gesetze, die ein paar
Hundert Leute in Bonn/Berlin entscheiden.
------------------------------
Date: 26 Sep 1999 00:40:56 GMT
From: Stuart Yeates <syeates@manuka.cs.waikato.ac.nz>
Subject: Re: HELP Why does the perl CGI choke from '@'
Message-Id: <938306455.341255@clint.waikato.ac.nz>
twebster5402@my-deja.com wrote:
: Below is a simple perl script that generates a response html
: and emails the form values. If I try to include a mailto: link
: or even just use the '@' character in a print, I get an
: InternalServer Error....WHY? How can I use the '@' character, and
: why does the script choke and die when it's there?????
'@' is a special character in perl. it indicates an array (or list).
you probably need to escape the @ symbol or quote it differently.
stuart
-- stuart yeates <s.yeates@cs.waikato.ac.nz> aka `loam'
words are, of course, the most powerful drug used by mankind - rudyard kipling
X-no-archive:yes
------------------------------
Date: 25 Sep 1999 19:17:19 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to find the directory a script is running from
Message-Id: <37ed741f@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"E. Preble" <preble@ipass.net> writes:
:Is there a command that will return the current directory of
:the perl program that is running?
pwd is the command in question, as in
chomp($mydir = `pwd`);
Happy commanding.
--tom
--
Rounded, wounded, grieve and sieve,
Friend and fiend, alive and live.
------------------------------
Date: 26 Sep 1999 02:03:20 GMT
From: "Paul J. Lucas" <tchrist@mox.perl.com>
Subject: Re: How to find the directory a script is running from
Message-Id: <37ed7ee8$0$226@nntp1.ba.best.com>
In <37ed741f@cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:
>In comp.lang.perl.misc,
> "E. Preble" <preble@ipass.net> writes:
>:Is there a command that will return the current directory of
>:the perl program that is running?
>pwd is the command in question, as in
> chomp($mydir = `pwd`);
My God... Tom is WRONG! pwd will return the current working
directory, granted; but that's not what the poster asked. He
specifically asked for the current directory OF THE PERL
PROGRAM THAT IS RUNNING.
The correct answer is: that's generally not an easy thing to
determine under Unix (assuming the original poster is running
under Unix):
$ cd /home/pjl/foo
$ /home/pjl/bar/script.pl
Here, pwd is '/home/pjl/foo', but that's not where the Perl
script is.
I believe what you have to do is look at $0 (zero): if it's a
full path (starts with a '/'), then THAT is the directory of
the Perl program that is running; if not, then you look at what
pwd returns and modify it if $0 contains any '../' to eventually
resolve the correct directory.
This is ugly, granted; but that's Unix.
- Paul
------------------------------
Date: 25 Sep 1999 21:37:53 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to find the directory a script is running from
Message-Id: <slrn7ur26i.9b.abigail@alexandra.delanet.com>
E. Preble (preble@ipass.net) wrote on MMCCXVI September MCMXCIII in
<URL:news:GIbH3.243$A3.479@news.ipass.net>:
== Is there a command that will return the current directory of
== the perl program that is running?
==
== If I have a script that has several copies, in several
== directories. I'd like to log which one runs, but I can't
== seem to uncover the directory name.
The easiest way to prevent that is not to have several copies; what
would be the point?
The general answer is that you cannot. Files can have multiple names,
so-called "hard link"s. That's why there is no remove function in Perl,
just an unlink one.
You could do tricks with `pwd` and $0, but $0 can be set by the environment,
so you can be fooled.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== 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: 26 Sep 1999 00:07:13 GMT
From: "Paul J. Lucas" <pjl@be-NOSPAM-st.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed63b1$0$214@nntp1.ba.best.com>
In <37ed0a72@cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting mailed to cited author]
>In comp.lang.perl.misc,
> "Paul J. Lucas" <pjl@be-NOSPAM-st.com> writes:
>: I want the caller to call some function that executes an SQL
>: query. The callee (the injector) would parse the query,
>: specfically the SELECT attributes; it would then use DBI to bind
>: the query resuts to "my" variables in the caller's scope.
>Why doesn't your function simply return a hashref, or perhaps take an
>argument which is a hashref to fill out?
Because accessing hashes is not as fast as accessing scalars
and I want it to be as fast as possible.
- Paul
------------------------------
Date: 26 Sep 1999 00:15:55 GMT
From: "Paul J. Lucas" <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed65bb$0$206@nntp1.ba.best.com>
In <37ed0f48@cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:
>In comp.lang.perl.misc,
> "Paul J. Lucas" <tchrist@mox.perl.com> writes:
>:>> P.S.: E-mail replies preferred; remember to despam my address.
>:>That's your job, not mine. Don't post such stupid addresses.
>:>You're giving in the criminals. Stop that. Fight them.
>: Does it actually change anything? Nope.
>: Why don't you go go charge some windmills?
>I don't hide behind address mungeing, and I expect others to do likewise.
>I have RBL sendmail hooks. These kill about 20 messages per day.
Well not everybody can convince their ISP to add these.
>I'll go back to killing the whole thing. If you expect an answer, stand up
>and take your lumps. This is a public forum. Post a legal address, or don't
>post.
OK, I'll post YOUR address. It meets your criteria: it's
legal.
As for not posting: tough. This isn't a moderated forum.
>And certainly don't expect other people to bend over backwards because
>of you.
I don't consider a simple deletion "bending over backwards."
And you despammed my address in your follow-up, so it couldn't
have been too much trouble.
>I am very seriously considering resurrecting my page of bogus addresses
>and their corrected translations and periodicly post on the web and
>here all the correct addresses by people who munged to this group,
>perhaps weekly.
1. You've got WAY too much time on your hands.
2. I noticed you declined to comment on the number of spammers
you've taken to court. You're full of little more than hot
air.
- Paul
------------------------------
Date: 26 Sep 1999 00:19:00 GMT
From: "Paul J. Lucas" <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed6674$0$202@nntp1.ba.best.com>
In <L6cH3.1208$V7.219411@news.itd.umich.edu> mcafee@waits.facilities.med.umich.edu (Sean McAfee) writes:
>In article <37ed05b1$0$201@nntp1.ba.best.com>,
>Paul J. Lucas <tchrist@mox.perl.com> wrote:
>> I want the caller to call some function that executes an SQL
>> query. The callee (the injector) would parse the query,
>> specfically the SELECT attributes; it would then use DBI to bind
>> the query resuts to "my" variables in the caller's scope.
>> Normally, you have to do a SELECT, declare "my" variables, and
>> do a bind. This means you specify the same attributes list 3
>> times. It's ugly, verbose, and error-prone.
>So all you need is to run a query that returns one row, and store the
>contents of that row in some variables? Why not just write a subroutine
>that executes the query and returns the row, letting you store the return
>values any way you want?
Because it's inefficient. That's the whole point of using
bind() in the DBI API: to get around that inefficiency.
- Paul
------------------------------
Date: 25 Sep 1999 19:10:52 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed729c@cs.colorado.edu>
In comp.lang.perl.misc,
"Paul J. Lucas" <pjl@best.com> writes:
: Because accessing hashes is not as fast as accessing scalars
: and I want it to be as fast as possible.
Then write it in assembly language. The difference is virtually
inconsequential. Have you measured it? Can you quantify the
distinction? Would doing one fewer access make up for it?
use Benchmark;
$scalar = $hash{"fred"} = $array[1] = "stuff";
timethese 10_000_000, {
"base" => sub { $x = "stuff" },
"scalar" => sub { $x = $scalar },
"array" => sub { $x = $array[1] },
"hash" => sub { $x = $hash{"fred"} },
}
Benchmark: timing 10000000 iterations of array, base, hash, scalar...
array: 34 wallclock secs (33.43 usr + 0.00 sys = 33.43 CPU)
base: 32 wallclock secs (32.23 usr + 0.00 sys = 32.23 CPU)
hash: 41 wallclock secs (40.95 usr + 0.00 sys = 40.95 CPU)
scalar: 33 wallclock secs (32.64 usr + 0.00 sys = 32.64 CPU)
That means that after a million iterations, you still don't have
a difference of a second. That's completely ludicrous to worry about.
Perhaps you should stop using subroutines: They take too long to call.
Perhaps you should stop using data structures: They take too long to access.
--tom
"Premature optimisation is the root of all evil." --thus spake Knuth
--
Please do not spam: "Paul J. Lucas" <pjl@best.com>
--
Besides, REAL computers have a rename() system call. :-)
--Larry Wall in <7937@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 25 Sep 1999 19:12:00 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed72e0@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
mcafee@waits.facilities.med.umich.edu (Sean McAfee) writes:
:So all you need is to run a query that returns one row, and store the
:contents of that row in some variables? Why not just write a subroutine
:that executes the query and returns the row, letting you store the return
:values any way you want?
Better yet, use global variables, not return lists.
Better yet, don't call a subroutine. Do it in-line.
Better yet, don't use Perl. Machine language would be faster.
--tom
--
When I was a boy I was told that anybody could become President. Now
I'm beginning to believe it.
--Clarence Darrow
------------------------------
Date: 26 Sep 1999 01:55:50 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <7sjuf6$6mn$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Tom Christiansen
<tchrist@mox.perl.com>],
who wrote in article <37ed729c@cs.colorado.edu>:
> In comp.lang.perl.misc,
> "Paul J. Lucas" <pjl@best.com> writes:
> : Because accessing hashes is not as fast as accessing scalars
> : and I want it to be as fast as possible.
>
> Then write it in assembly language. The difference is virtually
> inconsequential. Have you measured it?
Apparently, *you* did not.
use Benchmark;
$scalar = $hash{"fred"} = $array[1] = "stuff";
timethese 2_000_000, {
"base" => ' "stuff" ',
"scalar" => ' $scalar ',
"array" => ' $array[1] ',
"hash" => ' $hash{"fred"} ',
}
Benchmark: timing 2000000 iterations of array, base, hash, scalar...
array: 4 wallclock secs ( 3.01 usr + 0.00 sys = 3.01 CPU)
base: 1 wallclock secs ( 0.65 usr + 0.00 sys = 0.65 CPU)
hash: 3 wallclock secs ( 4.45 usr + 0.00 sys = 4.45 CPU)
scalar: 0 wallclock secs ( 1.06 usr + 0.00 sys = 1.06 CPU)
As anyone can see, accessing hashes is 4 (or more) times slower than
scalars. [In different runs I get better results for 'array', but the
ratio 'hash'/scalar is usually closer to 5.]
Ilya
P.S. Of course, in the context of doing SQL queries the difference
should not be observable.
------------------------------
Date: 25 Sep 1999 20:04:22 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed7f26@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
:[A complimentary Cc of this posting was sent to Tom Christiansen
:> Then write it in assembly language. The difference is virtually
:> inconsequential. Have you measured it?
:
:Apparently, *you* did not.
I clearly did. Read my results.
:Benchmark: timing 2000000 iterations of array, base, hash, scalar...
: array: 4 wallclock secs ( 3.01 usr + 0.00 sys = 3.01 CPU)
: base: 1 wallclock secs ( 0.65 usr + 0.00 sys = 0.65 CPU)
: hash: 3 wallclock secs ( 4.45 usr + 0.00 sys = 4.45 CPU)
: scalar: 0 wallclock secs ( 1.06 usr + 0.00 sys = 1.06 CPU)
:
:As anyone can see, accessing hashes is 4 (or more) times slower than
:scalars. [In different runs I get better results for 'array', but the
:ratio 'hash'/scalar is usually closer to 5.]
I disagree. My numbers which you have ignored read this way:
Benchmark: timing 10000000 iterations of array, base, hash, scalar...
array: 34 wallclock secs (33.43 usr + 0.00 sys = 33.43 CPU)
base: 32 wallclock secs (32.23 usr + 0.00 sys = 32.23 CPU)
hash: 41 wallclock secs (40.95 usr + 0.00 sys = 40.95 CPU)
scalar: 33 wallclock secs (32.64 usr + 0.00 sys = 32.64 CPU)
As anyone can see, accessing scalars took 20% less than the time that
accessing the hash took. That means it's 25% longer for the hash,
not 400% longer. Considering the 1:4 versus 4:1 connection, perhaps
you have a reciprocal error in your brain, or else your machine is
gravely broken. Or, I supppose, that mine is. But I most certainly
did measure that benchmark, and those are most certainly the numbers
I got. Perhaps you have another explanation, but those are my numbers.
Don't tell me I didn't measure it when I absolutley did.
--tom
--
It's a damn poor mind that can only think of one way to spell a word.
--Andrew Jackson
------------------------------
Date: 26 Sep 1999 01:50:38 GMT
From: "Paul J. Lucas" <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed7bee$0$221@nntp1.ba.best.com>
In <37ed729c@cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:
>In comp.lang.perl.misc,
> "Paul J. Lucas" <tchrist@mox.perl.com> writes:
>: Because accessing hashes is not as fast as accessing scalars
>: and I want it to be as fast as possible.
>Then write it in assembly language. The difference is virtually
>inconsequential. Have you measured it?
No; I didn't have to. Based on our interactions thus far, it
was trivial to conclude that your type-A personality bent on
being right would compel you to do the measuring for me.
It's easy to get you do to my bidding: just post something
silly and you will be compelled to do all the leg-work to show
me how right you are.
Thanks! Sucker.... :p
- Paul
------------------------------
Date: 26 Sep 1999 01:54:20 GMT
From: "Paul J. Lucas" <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ed7ccc$0$225@nntp1.ba.best.com>
In <37ed72e0@cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting mailed to cited author]
>In comp.lang.perl.misc,
> mcafee@waits.facilities.med.umich.edu (Sean McAfee) writes:
>:So all you need is to run a query that returns one row, and store the
>:contents of that row in some variables? Why not just write a subroutine
>:that executes the query and returns the row, letting you store the return
>:values any way you want?
>Better yet, use global variables, not return lists.
>Better yet, don't call a subroutine. Do it in-line.
>Better yet, don't use Perl. Machine language would be faster.
Were you beaten as a child or what? You're rude and nasty to
everybody (even those who use their real e-mail addresses).
- Paul
------------------------------
Date: Sun, 26 Sep 1999 02:15:02 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <GkfH3.1726$Af7.33795@news.rdc1.ct.home.com>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting mailed to cited author]
> In comp.lang.perl.misc,
> ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
> :[A complimentary Cc of this posting was sent to Tom Christiansen
> :> Then write it in assembly language. The difference is virtually
> :> inconsequential. Have you measured it?
> :
> :Apparently, *you* did not.
> I clearly did. Read my results.
You both need to read each other's benchmark subs, it seems.
> :Benchmark: timing 2000000 iterations of array, base, hash, scalar...
> : array: 4 wallclock secs ( 3.01 usr + 0.00 sys = 3.01 CPU)
> : base: 1 wallclock secs ( 0.65 usr + 0.00 sys = 0.65 CPU)
> : hash: 3 wallclock secs ( 4.45 usr + 0.00 sys = 4.45 CPU)
> : scalar: 0 wallclock secs ( 1.06 usr + 0.00 sys = 1.06 CPU)
> :
> :As anyone can see, accessing hashes is 4 (or more) times slower than
> :scalars. [In different runs I get better results for 'array', but the
> :ratio 'hash'/scalar is usually closer to 5.]
> I disagree. My numbers which you have ignored read this way:
> Benchmark: timing 10000000 iterations of array, base, hash, scalar...
> array: 34 wallclock secs (33.43 usr + 0.00 sys = 33.43 CPU)
> base: 32 wallclock secs (32.23 usr + 0.00 sys = 32.23 CPU)
> hash: 41 wallclock secs (40.95 usr + 0.00 sys = 40.95 CPU)
> scalar: 33 wallclock secs (32.64 usr + 0.00 sys = 32.64 CPU)
The two of you measured different things. Tom's measurements included an assignment,
while Ilya's didn't. Given the two benchmarks, the following conclusions seem obvious:
1) Scalar access is three times faster than array access and four times as fast as
hash access
2) Both are swamped by the cost of the assignment
3) two million hash accesses is still faster than making a single Oracle SQL*Net
connection to a non-local database.
Dan
------------------------------
Date: 25 Sep 1999 22:03:24 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <slrn7ur3me.9b.abigail@alexandra.delanet.com>
Paul J. Lucas (tchrist@mox.perl.com) wrote on MMCCXVII September MCMXCIII
in <URL:news:37ed65bb$0$206@nntp1.ba.best.com>:
{}
{} OK, I'll post YOUR address. It meets your criteria: it's
{} legal.
I've reported that fact to abuse@best.com and abuse@verio.com.
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: 26 Sep 1999 01:23:22 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Need a unique "ID" string
Message-Id: <7sjsia$6g1$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Russ Allbery
<rra@stanford.edu>],
who wrote in article <yl905vgj3k.fsf@windlord.stanford.edu>:
> Guaranteed-unique is somewhat hard, but if you use something like:
>
> time() . "-$$"
>
> you'll get a unique ID unless the process exits before a second has passed
> *and* process numbers on your system manage to repeat within the space of
> a second. A lot of Unix software that generates message IDs assumes it's
> a fairly safe bet this won't happen.
Note that both assumptions can easily break on OS/2. [OS/2 starts to
use non-Unixish PID algorithm *after* PIDs wraps. Since the only way
I know to wrap PIDs on OS/2 in real life is to run Configure scripts
;-), it is pretty hard to convince IBM to change this.]
What about throwing in rand() as well? I think newer Perls use
a pretty robust algo to srand(). Would not it use high-resolution
time if present?
Ilya
------------------------------
Date: Sat, 25 Sep 1999 21:29:02 -0400
From: "The Smiths" <smiths@erols.com>
Subject: Re: Need a unique "ID" string
Message-Id: <7sjsl8$fc0$1@winter.news.rcn.net>
Thanks to all for your responses. They were great and probably better than
what I tried right after I posted my original note.
$id = time() . int(rand(1000));
... Tim.
The Smiths <smiths@erols.com> wrote in message
news:7sik0c$9ou$1@winter.news.rcn.net...
> I need to generate a unique numeric string that gets recorded each time my
> PERL cgi is invoked.
>
> I am currently using time() to do this, but in a high volume situation, I
> could easily wind up with duplicate ID numbers.
>
> Is there a better or even standard way to generate guaranteed unique IDs
for
> each invocation of the CGI without using a counter file?
>
> How do "session" oriented web sites generate the session IDs found in
> cookies and query_strings?
>
> Thanks,
> Tim.
>
>
------------------------------
Date: 25 Sep 1999 19:14:19 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Cookbook Question
Message-Id: <37ed736b@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"CS" <@mdo.net> writes:
:In example 14.3 of the Perl cookbook, I don't understand what this
:particular section of code is doing.
I sent the reply privately.
--tom
--
"If you only have a nail, you tend to see every hammer as a problem."
--Larry Wall
------------------------------
Date: 25 Sep 1999 19:22:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: PERL PROBLEM - ERROR 405 method not allowed
Message-Id: <slrn7uqq97.9b.abigail@alexandra.delanet.com>
CyberMart (cmmktg@cybermart.com.sg) wrote on MMCCXIV September MCMXCIII
in <URL:news:37EA99D0.1E6F4AFB@cybermart.com.sg>:
()
() How to configure PERL in the NT registry as I getting an error message
() "HTTP ERROR 405
^^^^
What makes you think that HTTP is an alias for Perl?
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
-----------== 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: 25 Sep 1999 19:18:47 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: rotating random banners 2 at a time
Message-Id: <37ed7477@cs.colorado.edu>
In comp.lang.perl.misc,
Dan Woods <dwoods@ucalgary.ca> writes:
:I've seen Perl scripts which can do rotating banners,
:however I was wondering what is the most efficient
:way to avoid showing the same banner twice
:on a web page ? The problem is I have a list of
:just 6-10 banners (not ads), and I want to display
:two at a time *uniquely*.
I don't imagine you can tell us what site this is so we
can add them to the real-time blackhole for web spamverts?
--tom
--
Only God can make random selections.
------------------------------
Date: 25 Sep 1999 19:16:29 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: weekly update suggestions
Message-Id: <37ed73ed@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Dan Woods <dwoods@ucalgary.ca> writes:
:I have a need to rotate a web page "once a week" only,
:like a 'special of the week'. I have no problem with
:a perl script (or ksh) to do this if I can use cron
:jobs. However, this user uses a host provider that
:does not do that.
Then you'll have to find one that does. This is crazy.
What's next? How to write perl without typing? You
can't live without tools.
--tom
--
I know it's weird, but it does make it easier to write poetry in perl. :-)
--Larry Wall in <7865@jpl-devvax.JPL.NASA.GOV>
------------------------------
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 909
*************************************