[8377] in Perl-Users-Digest
Perl-Users Digest, Issue: 1994 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Feb 28 20:15:06 1998
Date: Sat, 28 Feb 98 17:00:25 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 28 Feb 1998 Volume: 8 Number: 1994
Today's topics:
Re: "Learning Perl" or "Programming Perl" (Juergen Heinzl)
Re: "Learning Perl" or "Programming Perl" (David Oswald)
Re: "Learning Perl" or "Programming Perl" (Robert F. Harrison)
Re: Form-to-EMail <corky@ma.ultranet.com>
Is this behaviour of => correct? (Marc Liyanage)
Re: Is this behaviour of => correct? (Abigail)
Re: Java's hidden flaw lvirden@cas.org
Need Help Compiling Perl 5.004_04 on HP-UX 9 (Clarence T. Pate)
newline <dan.albertsson@swipnet.se>
Re: Passing an argument to a perl script. (Nathan V. Patwardhan)
PERL Install (kbrain)
Perl on Solaris x86 <wolfgang.bergbauer@munich.netsurf.de>
Perl on Solaris x86 <wolfgang.bergbauer@munich.netsurf.de>
Perl on Solaris x86 <wolfgang.bergbauer@munich.netsurf.de>
Perl on Solaris x86 <wolfgang.bergbauer@munich.netsurf.de>
Perl on Solaris x86 <wolfgang.bergbauer@munich.netsurf.de>
Perl on Solaris x86 <wolfgang.bergbauer@munich.netsurf.de>
Perl on Solaris x86 <wolfgang.bergbauer@munich.netsurf.de>
Re: Q: splice() time complexity, want linked lists? (Abigail)
Re: Q: splice() time complexity, want linked lists? (Abigail)
Random Link Script for NT Server? <carlt@dial.pipex.com>
Re: reg expression help.. (Alex Krohn)
replace a word in file... (Lalit Jairath)
Re: replace a word in file... (Michael Martin)
Re: Slurping Strings <rjk@coos.dartmouth.edu>
Re: The Ineffable Tom C. <bcoleman@mindspring.com>
Re: Trapping Domain (or IP) of user who 'Clicks' on a L <jbc@west.net>
Re: Year 2000 (Abigail)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 28 Feb 1998 20:33:26 GMT
From: juergen@unicorn.noris.de (Juergen Heinzl)
Subject: Re: "Learning Perl" or "Programming Perl"
Message-Id: <slrn6fgtgp.54.juergen@unicorn.noris.de>
In article <MPG.f6215f3d2e27cd2989680@news.ionet.net>, Benjamin Smith wrote:
>Hi,
>
>I'm trying to get started with Perl and I'd like to purchase a book
>from those fine people at O'Reilly but minimize my initial expenses by
>only getting one. My question is "Learning Perl" or "Programming
>Perl"?
Well, I started with "Programming Perl" for the simple reason "Learning
Perl" was not yet available then. Since you wrote you have already done
a lot of coding it might be okay to get that one.
Have fun and don't be in a hurry,
Juergen
--
\ Real name : Juergen Heinzl \ no flames /
\ EMail Private : unicorn@noris.de \ send money instead /
\ Phone Private : +49 911-4501186 \ /
------------------------------
Date: Sat, 28 Feb 1998 23:57:38 GMT
From: doswald@xmission.com (David Oswald)
Subject: Re: "Learning Perl" or "Programming Perl"
Message-Id: <34f8a3be.49798531@news.xmission.com>
>>I'm trying to get started with Perl and I'd like to purchase a book
>>from those fine people at O'Reilly but minimize my initial expenses by
>>only getting one. My question is "Learning Perl" or "Programming
>>Perl"?
They're both fantastic books. Even having read them both I still find
myself frequently referring back to both of them. Next on my list
(already ordered; just waiting for it to come in) is Mastering Regular
Expressions. O Reilly & Assoc., Inc. really publishes the cream of
the crop.
Dave
------------------------------
Date: 1 Mar 98 00:45:31 GMT
From: harrison@pixi.com (Robert F. Harrison)
Subject: Re: "Learning Perl" or "Programming Perl"
Message-Id: <slrn6fhbsl.a1d.harrison@localhost.localdomain>
On Sat, 28 Feb 1998 23:57:38 GMT, David Oswald <doswald@xmission.com> wrote:
>
> They're both fantastic books. Even having read them both I still find
> myself frequently referring back to both of them. Next on my list
> (already ordered; just waiting for it to come in) is Mastering Regular
> Expressions. O Reilly & Assoc., Inc. really publishes the cream of
> the crop.
I'll second that...I borrow copies of O'Reilly books on the topics I
have no interest in just to read them. [And since I have the new Camel
on CD [came with Web Master in a Nutshell deluxe, I'm having a real
hard time deciding if I want to rip the cover off my old copy to get
25% off a new one...]
Taken together, the Camel and the Llama are simply good books worth
reading even if you don't want to learn Perl. :-)
--
rfh harrison@pixi.com
------------------------------
Date: Sat, 28 Feb 1998 15:39:10 -0500
From: Bob Trieger <corky@ma.ultranet.com>
Subject: Re: Form-to-EMail
Message-Id: <34F8749A.EE9@ma.ultranet.com>
M. Kay Aufrance wrote:
>
> For the many who are asking about email forms processing in perl
> Form-to-EMail for Windows NT is at http://www.aufrance.com
>
> We include not only the source but also complete instructions and
> customer support.
>
This does not belong in a perl newsgroup. try alt.forsale.*
You forgot to mention that it is only[sic] $179 and will only work on 2
specific web servers.
--
Bob Trieger
corky@ultranet.com
------------------------------
Date: Sat, 28 Feb 1998 23:28:09 +0100
From: liyanage@access.ch (Marc Liyanage)
Subject: Is this behaviour of => correct?
Message-Id: <B11E4E09966875C4AC@mirage.techno.ch>
I'm wondering if this is a bug...
I'm building a HASH with the => operator. The man page says => behaves like
comma but treats the operator to its left like a string.
In this example
my ($stylesheet_conversion) = {
Tit29Lio => { HTML => "<%text%><BR>", category => 'title'},
Rub-Tit19 => { HTML => "<%text%><BR>", category => 'title'},
__default__ => { HTML => "<P><%text%></P>\n", category => 'bodytext'},
};
The third key, "Rub-Tit19" doesn't appear in the HASH afterwards. It only
works
if I do
'Rub-Tit19' => { HTML => "<%text%><BR>", category => 'title'},
instead. If I don't quote it, it seems to get evaluated and a zero is
inserted.
I don't have this problem with the other keywords that don't have a dash.
Is this correct behaviour?
Manpage sez:
The => digraph is mostly just a synonym for the comma
operator. It's useful for documenting arguments that come
in pairs. As of release 5.001, it also forces any word to
the left of it to be interpreted as a string.
And I'm using Perl > 5.001
Please cc: my mailbox if you followup...
-Marc
------------------------------
Date: 1 Mar 1998 00:03:33 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Is this behaviour of => correct?
Message-Id: <6da8kl$c3p$2@client3.news.psi.net>
Marc Liyanage (liyanage@access.ch) wrote on 1642 September 1993 in
<URL: news:B11E4E09966875C4AC@mirage.techno.ch>:
++
++ Is this correct behaviour?
++
++ Manpage sez:
++
++ The => digraph is mostly just a synonym for the comma
++ operator. It's useful for documenting arguments that come
++ in pairs. As of release 5.001, it also forces any word to
++ the left of it to be interpreted as a string.
Yes, it is correct behaviour. The problem lies in the interpretation
of 'word'. "Rub-Tit19" isn't seen by Perl as a single word.
It's an expression, 'Rub' - 'Tit19'. If you use strict; and -w, Perl
would have told you.
A "word" consists of a letter or underscore, followed by zero or
more letters, underscores and digits. It is optionally preceded by
a dash.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
------------------------------
Date: 27 Feb 1998 17:10:32 GMT
From: lvirden@cas.org
Subject: Re: Java's hidden flaw
Message-Id: <6d6s28$8nv$1@srv38s4u.cas.org>
According to John Porter <jdporter@min.net>:
:or three? But when Sun's marketroids get hold of it....
:Now look what they're doing to Tcl -- "SunScript".
:"A Sun development team dedicated to promoting Tcl/Tk as the
:scripting language for the next generation of enterprise and
:Internet applications." (sunscript.sun.com)
1. The creator of Tcl invented that one.
2. The only think relating to Tcl that I blame Sun about is not
realizing what they had while they had it.
2. Tcl (and SunScript) are no longer a part of Sun Research...
--
Larry W. Virden <URL:mailto:lvirden@cas.org> Quote: In heaven, there is no
<*> O- <URL:http://www.teraform.com/%7Elvirden/> panic, only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Sat, 28 Feb 1998 20:56:29 GMT
From: (Clarence T. Pate)
Subject: Need Help Compiling Perl 5.004_04 on HP-UX 9
Message-Id: <34f877d2.14526818@winproxy>
I am new to perl and compiling programs on UNIX machines. I am trying
to compile Perl 5.004_04 on an HP-UX 9 box with a PA1.1 processor. I
have compiled using the defaults, and I have tried with some changes.
I keep receiving an error during the `make depend`. After each object
file, there are a few lines with an error that suggests using option
'-H'. Next comes aline with perl.h and 'out of space'. Where would I
use the '-H' option?
Is there some place to get more documentation on how to compile Perl
other than the documentation that comes with the package?
Will the compile work with the standard compiler that comes with HP-UX
9?
Thanks in advance,
Clarence T. Pate
------------------------------
Date: 28 Feb 1998 23:22:11 GMT
From: "DAN ALBERTSSON" <dan.albertsson@swipnet.se>
Subject: newline
Message-Id: <01bd449e$dcb1c000$eeebf482@default>
I have a text file in which I store each record on a row of it's own. Some
records contain newlines (entered via <TEXTAREA> in html). How do I
substitute those newlines so can store each record on a separate row and
then substitute them back when I read the file.
I have tried to use:
$row =~ tr/\r//d;
$row =~ tr/\n/\v/;
to substitute them to a vertical tab instead but it seems to result in
plain/standard v instead. Why. Or can I do it in another way.
Thanks
/dan
------------------------------
Date: 28 Feb 1998 20:14:23 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Passing an argument to a perl script.
Message-Id: <6d9r6v$rg7@fridge.shore.net>
Ray Reza (rayreza@worldnet.att.net) wrote:
: If you want to pass an argument to the perl you can use system var
: @_ to get that argument like this
I don't think that's what they were looking for. They wanted to pass
an argument to a *script*, if I'm correct, in which case they should
look into @ARGV.
--
Nathan V. Patwardhan
------------------------------
Date: Sat, 28 Feb 1998 13:58:32 -0700
From: kbrain@super.zippo.com (kbrain)
Subject: PERL Install
Message-Id: <kbrain-2802981358320001@chimaera.anapraxis.com>
Hi,
I'm, in the process of installing PERL 5.004_04 on a BSDI 3.1 machine. I
am however getting a couple of problems:
The first is a cc -c flag option. When trying to compile as the default,
-fPIC I get an error. It seems that this works if I use no flags, is this
OK?
The second problem is the following:
setregid() found.
*** WHOA THERE!!! ***
The recommended value for $d_setregid on this machine was "undef"!
Keep the recommended value? [y]
setresgid() NOT found.
setreuid() found.
*** WHOA THERE!!! ***
The recommended value for $d_setreuid on this machine was "undef"!
Keep the recommended value? [y]
setresuid() NOT found.
setrgid() found.
*** WHOA THERE!!! ***
The recommended value for $d_setrgid on this machine was "undef"!
Keep the recommended value? [y]
setruid() found.
*** WHOA THERE!!! ***
The recommended value for $d_setruid on this machine was "undef"!
Keep the recommended value? [y]
Is it OK to accept the default of undef here? This doesn't make sense to
me, but I don't know what else it would be.
Using the above settings, I get the following:
doio.c: In function Perl_do_ipcctl:
doio.c:1381: argument #4: incompatible types in argument passing
doio.c:1432: argument #4: incompatible types in argument passing
*** Error code 1
Is this related to the above?
Thanks!
kb
------------------------------
Date: Sun, 01 Mar 1998 05:21:42 +0100
From: Wolfgang Bergbauer <wolfgang.bergbauer@munich.netsurf.de>
Subject: Perl on Solaris x86
Message-Id: <34F8E256.F7473B57@munich.netsurf.de>
Hi there,
I need some help,
I downloaded the Perl 5.003 Binary for Solaris x86,
Larry Wall says in his book that there should be a Copying file for
more information about configurating perl.
There is no file like this an I can not find any Information about the
configuration.
What do I have to do.
I extracted evrything in a tmp folder, copied the Manuals to /usr/man
and thats it. What else ??
Thanks for your help !
------------------------------
Date: Sun, 01 Mar 1998 05:22:59 +0100
From: Wolfgang Bergbauer <wolfgang.bergbauer@munich.netsurf.de>
Subject: Perl on Solaris x86
Message-Id: <34F8E2A3.32AD305B@munich.netsurf.de>
Hi there,
I need some help,
I downloaded the Perl 5.003 Binary for Solaris x86,
Larry Wall says in his book that there should be a Copying file for
more information about configurating perl.
There is no file like this an I can not find any Information about the
configuration.
What do I have to do.
I extracted evrything in a tmp folder, copied the Manuals to /usr/man
and thats it. What else ??
Thanks for your help !
------------------------------
Date: Sun, 01 Mar 1998 05:24:32 +0100
From: Wolfgang Bergbauer <wolfgang.bergbauer@munich.netsurf.de>
Subject: Perl on Solaris x86
Message-Id: <34F8E300.78A2B056@munich.netsurf.de>
Hi there,
I need some help,
I downloaded the Perl 5.003 Binary for Solaris x86,
Larry Wall says in his book that there should be a Copying file for
more information about configurating perl.
There is no file like this an I can not find any Information about the
configuration.
What do I have to do.
I extracted evrything in a tmp folder, copied the Manuals to /usr/man
and thats it. What else ??
Thanks for your help !
------------------------------
Date: Sun, 01 Mar 1998 05:25:02 +0100
From: Wolfgang Bergbauer <wolfgang.bergbauer@munich.netsurf.de>
Subject: Perl on Solaris x86
Message-Id: <34F8E31E.5B8D754F@munich.netsurf.de>
Hi there,
I need some help,
I downloaded the Perl 5.003 Binary for Solaris x86,
Larry Wall says in his book that there should be a Copying file for
more information about configurating perl.
There is no file like this an I can not find any Information about the
configuration.
What do I have to do.
I extracted evrything in a tmp folder, copied the Manuals to /usr/man
and thats it. What else ??
Thanks for your help !
------------------------------
Date: Sun, 01 Mar 1998 05:24:08 +0100
From: Wolfgang Bergbauer <wolfgang.bergbauer@munich.netsurf.de>
Subject: Perl on Solaris x86
Message-Id: <34F8E2E8.7CBA0F16@munich.netsurf.de>
Hi there,
I need some help,
I downloaded the Perl 5.003 Binary for Solaris x86,
Larry Wall says in his book that there should be a Copying file for
more information about configurating perl.
There is no file like this an I can not find any Information about the
configuration.
What do I have to do.
I extracted evrything in a tmp folder, copied the Manuals to /usr/man
and thats it. What else ??
Thanks for your help !
------------------------------
Date: Sun, 01 Mar 1998 05:26:31 +0100
From: Wolfgang Bergbauer <wolfgang.bergbauer@munich.netsurf.de>
Subject: Perl on Solaris x86
Message-Id: <34F8E377.E8DDBE45@munich.netsurf.de>
Hi there,
I need some help,
I downloaded the Perl 5.003 Binary for Solaris x86,
Larry Wall says in his book that there should be a Copying file for
more information about configurating perl.
There is no file like this an I can not find any Information about the
configuration.
What do I have to do.
I extracted evrything in a tmp folder, copied the Manuals to /usr/man
and thats it. What else ??
Thanks for your help !
------------------------------
Date: Sun, 01 Mar 1998 05:28:10 +0100
From: Wolfgang Bergbauer <wolfgang.bergbauer@munich.netsurf.de>
Subject: Perl on Solaris x86
Message-Id: <34F8E3DA.5E8619E5@munich.netsurf.de>
Hi there,
I need some help,
I downloaded the Perl 5.003 Binary for Solaris x86,
Larry Wall says in his book that there should be a Copying file for
more information about configurating perl.
There is no file like this an I can not find any Information about the
configuration.
What do I have to do.
I extracted evrything in a tmp folder, copied the Manuals to /usr/man
and thats it. What else ??
Thanks for your help !
------------------------------
Date: 1 Mar 1998 00:17:03 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Q: splice() time complexity, want linked lists?
Message-Id: <6da9dv$c3p$3@client3.news.psi.net>
David Petrou (dpetrou@cs.cmu.edu) wrote on 1642 September 1993 in
<URL: news:6d9iev$77u$1@goldenapple.srv.cs.cmu.edu>:
++ Hi. Let's say I have an array and want to remove an element in the
++ middle, moving all the remaining elements up to fill the hole. It
++ appears that I can do this with split(), but I'm a bit worried about
++ how long it takes to do this. I'll be using this operation in an LRU
++ stack-depth analysis tool dealing with millions of elements.
For arrays, you'd be using splice(), not split(). But splice can take
time linear to the size of the array.
++ What I really want is a data structure that let's me do head insertion
++ O(1), removal of any element in any location O(1), and traversal in
++ O(n), where n is the number of elements in the structure. In other
++ words, I want a singly-linked list. Am I unnaturally trying to get
++ linked list performance from arrays?
Yes. If you want linked lists, make a linked list. Not an array.
++ What's the perl way (or _one_ of the ways to do it in perl)?
A while back, linked list were discussed in clpm as well.
Dejanews will show up them, including various implementation
suggestions.
Abigail
--
perl -we '%_ = map {local $_ = $_; y/a-z/n-za-m/; ($_, $_)} @_ = map {lc} <>;
print grep {$_{$_}} @_' < /usr/dict/words
------------------------------
Date: 1 Mar 1998 00:18:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Q: splice() time complexity, want linked lists?
Message-Id: <6da9gg$c3p$4@client3.news.psi.net>
David Petrou (dpetrou@cs.cmu.edu) wrote on 1642 September 1993 in
<URL: news:6d9ob3$a74$1@goldenapple.srv.cs.cmu.edu>:
++
++ Gerr. Obviously I meant "doubly-linked" list. (Since you can't
++ remove an arbitrary element in O(1) using singly-linked lists.)
Why not?
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: Sat, 28 Feb 1998 21:31:35 +0000
From: Carl <carlt@dial.pipex.com>
Subject: Random Link Script for NT Server?
Message-Id: <34F88237.12AB@dial.pipex.com>
Hi,
Do you know of a random link script for NT IIS4?
Any info would be greatly appreciated.
Email: carlt@dial.pipex.com
Thanks.
------------------------------
Date: Sat, 28 Feb 1998 21:31:39 GMT
From: alex@gossamer-threads.com (Alex Krohn)
Subject: Re: reg expression help..
Message-Id: <34f88162.9815687@coburg>
On Wed, 25 Feb 1998 20:45:42 -0500, Chipmunk <rjk@coos.dartmouth.edu>
wrote:
>Cameron Kaiser wrote:
>>
>> alex@gossamer-threads.com (Alex Krohn) writes:
>>
>> >eval { $match = ($values[$field] =~ /$expr/) };
>> >
>> >Does putting an eval in there every time make
>> >things worse then before?
>>
>> If eval is being looped around, yes. eval in a loop degrades runtime because
>> the block has to be recompiled each time. You should put the loop in the
>> eval instead.
>
>Programming Perl, 2nd Ed, pg 161:
>
> eval
> ...
> If the code to be executed doesn't vary, you should use the eval BLOCK
> form to trap runtime errors; *the code in the block is compiled only
> once rather than on each execution*, yielding greater efficiency.
> ...
> [my emphasis]
The eval is being looped around (as it loops line by line through a
flat file database and compares the search term to the info in the
file).
Since each execution of the loop will most likely be comparing the
search input with different text, I assume this means the code does
vary, and so the reg exp will have to be recompiled each time?
The reason I have to put an eval there is I want to let people search
via reg expressions, but I can't trust that they will form one
properly.
But since the reg expression is different every time through the loop,
does it matter if I use eval (as won't with or w/out eval the regexp
will have to be recompiled?)
Thanks for any insight!
Alex
------------------------------
Date: 28 Feb 1998 22:10:33 GMT
From: ljairath@wright.aps.uoguelph.ca (Lalit Jairath)
Subject: replace a word in file...
Message-Id: <6da20p$1un@ccshst05.uoguelph.ca>
hi there,
is there a unix command (or possibly script) that make a change (replace/
delete a word etc.) and save the file on disc (off-course i don't want
to do it manually by going into the file and making changes there!).
Thanks for help.
you may pl. e-mail me:
ljairath@wright.aps.uoguelph.ca
Lalit
~~~~~~
------------------------------
Date: 1 Mar 1998 00:46:36 GMT
From: dmmartin@home.net (Michael Martin)
Subject: Re: replace a word in file...
Message-Id: <6dab5c$s5p$1@ha2.rdc1.sfba.home.com>
Hi,
>is there a unix command (or possibly script) that make a change (replace/
>delete a word etc.) and save the file on disc (off-course i don't want
>to do it manually by going into the file and making changes there!).
I don't know about a UNIX command (words like grep and egrep come to mind), you
are in the wrong newsgroup for that anyway. but it would be pretty simple to
write a Perl script that does that. Take a look at the prelre man page, and
look at s/// (substitution).
Here is a little snipit to get you started:
#!/usr/bin/perl
use strict;
my($word, $replacement, $file);
$word = $ARGV[0];
$replacement = $ARGV[1];
$file = $ARGV[2];
open(FILE, "+<$file");
while(<FILE>){
s/\b$word\b/\b$replacement\b/ig;
}
close(FILE);
print "done\n";
__END__
well, actully that is a simple program to replace $word with $replacement in
$file (useage: %replace foo bar /etc/passwd).
HTH,
Philip
------------------------------
Date: Sat, 28 Feb 1998 15:00:08 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Michael Conlen <meconlen@intnet.net>
Subject: Re: Slurping Strings
Message-Id: <34F86CCD.250EC8DA@coos.dartmouth.edu>
[posted and mailed]
Michael Conlen wrote:
>
> Now what I would like to do is convert line[1] from being equal to
> "Subject\072 Perl" to being equal to "Subject: Perl".
s/\\(0\d*)/chr oct $1/ge;
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
It's funny 'cause it's true ... and vice versa.
------------------------------
Date: Sat, 28 Feb 98 17:26:29 +0400
From: "Ben Coleman" <bcoleman@mindspring.com>
Subject: Re: The Ineffable Tom C.
Message-Id: <noaousosaskdqdm.pminews@user-37kbbgb.dialup.mindspring.com>
On 28 Feb 1998 18:18:07 GMT, John wrote:
>I suggest different
>books, but _always_ warn people to stay away from "Learning Perl
>on Win32", which is co-authored by Tom C. Tom has posted slams on
>NT and Win32, or posted his kill-file list that includes anything to
>do with Win32. For him to try and profit from Win32 is a dictionary
>definition of Hypocracy.
Hmmm. Gee, is it possible that Tom C.'s name appears on LPoW because
it's adapted from "Learning Perl"(which Tom did coauthor), and not
because Tom had anything to do with the Win32 parts? That, perhaps,
Eric Olson took LP and edited it for Win32? And that it wouldn't be
right to use Tom's work and not give him credit? Methinks you apply
the hypocracy label a little quickly.
Ben
--
Ben Coleman NJ8J | The attempt to legislatively
Internet: bcoleman@mindspring.com | micromanage equality results, at
http://bcoleman.home.mindspring.com/ | best, in equal misery for all.
------------------------------
Date: Sat, 28 Feb 1998 12:18:13 -0800
From: John Callender <jbc@west.net>
Subject: Re: Trapping Domain (or IP) of user who 'Clicks' on a Link...
Message-Id: <34F87105.C7C9056E@west.net>
Mr. Roboto wrote:
>
> Anyone have a simple script handy that can trap the Domain (preferred)
> or IP of a user who 'Clicks' on a link (either text or graphic)?
As you will probably discover fairly soon, some of the people who read
this group prefer that questions like this be posted in
comp.infosystems.www.cgi. These folks like to claim that the question
has nothing to do with perl, which seems somewhat silly, since most of
them would consider a perl script to be the logical way to accomplish
this. What they mean, I think, is that it's a boring question to them,
and they would prefer that boring questions like that be confined to the
backwaters of c.i.w.cgi. They probably have a point.
Interestingly, some of these same people will cheerfully insult your
intelligence for not knowing the answer already, regardless of which
group you post it in. Sort of like that comedy sketch where the man goes
up to the window and asks for a cheeseburger, and is told this is the
window for *picking up* orders, not *placing* them. And of course, when
the customer goes to the other window, the same employee walks over and
tells him "Sorry; we're fresh out of cheeseburgers."
But I digress.
In point of fact, I do have a simple script to do this. I would have
mailed it, but your E-mail address is bogus. Hmmm. Anyway, I don't have
much of a reputation to lose around here, so here you go. A few things
are going to be system-dependent, so they may not work with your Web
server setup. But this should get you pretty close.
#!/usr/bin/perl
# redirect.cgi -- redirect a click and log the
# user's IP address...
use CGI;
$query = new CGI;
$location = $query->param('location');
$remote_host = $query->remote_host();
$time = localtime;
$logfile = "/some/directory/that/is/world/writeable/log.txt"
print "Location: $location\n\n";
$log_string = "$remote_host\t$time\t$location\n";
open OUT, ">>$logfile" or
warn "Couldn't open $logfile for appending: $!\n";
print OUT $log_string;
close OUT;
## script ends...
You're going to need the CGI.pm module installed. Then you just
construct your links in the following form:
<A HREF="redirect.cgi?location=http://www.somewhere.com/something.html">
Logged destination</A>
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: 1 Mar 1998 00:21:04 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Year 2000
Message-Id: <6da9lg$c3p$5@client3.news.psi.net>
A. Maxwell (MAXWELL-AD@ulst.ac.uk) wrote on 1642 September 1993 in
<URL: news:34F7E14A.63B2@ulst.ac.uk>:
++
++ The time function returns the number of non-leap seconds since January
++ 1, 1970, what will happen in the year 2000 . As far as I know the year
++ has 1900 subtracted from it. Therefore I assume that the year will be
++ displayed as 00 for 2000, 01 for 2001 etc.
I guess that if you think that 2000 - 1900 equals 00, reading
the manual, the faq, or even this newsgroups is too difficult
for you too.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 1994
**************************************