[12176] in Perl-Users-Digest
Perl-Users Digest, Issue: 5776 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 25 14:07:20 1999
Date: Tue, 25 May 99 11:00:15 -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 Tue, 25 May 1999 Volume: 8 Number: 5776
Today's topics:
$var =~ s/string/pattern/i does not work... lpacania@my-dejanews.com
Changing <STDIN> (David Walford)
Re: need an anti-leech script <jdporter@min.net>
Re: need an anti-leech script (John Stanley)
Re: need an anti-leech script (John Stanley)
Re: need an anti-leech script <tchrist@mox.perl.com>
Re: Perl compiler...If or when <corus@my-dejanews.com>
Re: Perl compiler...If or when (Greg Bacon)
Re: Perl compiler...If or when <tchrist@mox.perl.com>
Re: Perl compiler...If or when <tchrist@mox.perl.com>
Re: Permission denied <cassell@mail.cor.epa.gov>
Re: removings " "s from strings <tchrist@mox.perl.com>
Re: Return of array <kensai@nortel.com>
Re: Web stats & reinvention avoidance. (Michel Dalle)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 25 May 1999 17:19:41 GMT
From: lpacania@my-dejanews.com
Subject: $var =~ s/string/pattern/i does not work...
Message-Id: <7iem39$50n$1@nnrp1.deja.com>
Hi,
I'm trying to build a rule based substitution engine
to clean up some flat files.
I've got my substitution patterns in a seperate file, I read that file
as an input file.
$rule = <RULEFILE>;
$line = <INFILE>;
while ($rule ne"") {
while ($line ne "");
$line =~ $rule; <------- this does not work...
print ($line);
print OUTFILE ($line);
$line = <INFILE>;
}
I step through the debugger and PERL picks up the rule and the line
fine but does not do anything with the $line =~ $rule. I remember when
I used to code in awk you had to enclose strings that were to be
interpreted as commands some way. Is this the same for perl?
RULEFILE CONTENTS: (1,000 rules)
s/auto(?!motive)/automotive/i
s/dlr/dealers/i
Thanks,
Lener
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 25 May 1999 17:53:04 GMT
From: davewal@echo.corp.sgi.com (David Walford)
Subject: Changing <STDIN>
Message-Id: <7ieo20$se3$1@murrow.corp.sgi.com>
When executing a script from a unix shell a line like;
chomp ($dir = <STDIN>);
will suspend the script and allow me to enter variables into the script from the
command line.
Could someone give me an example or point me in the right direction to redirect
the <STDIN> to another input. For instance, after a script goes into a while
loop, could I enter variables into it from over the network or from a webpage
without re-executing the script?
Thanks
David
--
--------------------------------------------------------------
David M. Walford | email: davewal@corp.sgi.com
RealityCenter Tech. Engr. | m/s: 06U-122
Silicon Graphics, Inc. | voice: 650-933-6451
Corporate Briefing Center | fax: 650-932-6451
------------------------------
Date: Tue, 25 May 1999 16:59:19 GMT
From: John Porter <jdporter@min.net>
Subject: Re: need an anti-leech script
Message-Id: <7iekt5$436$1@nnrp1.deja.com>
In article <374abb3e@cs.colorado.edu>,
tchrist@mox.perl.com (Tom Christiansen) wrote:
> [courtesy cc of this posting mailed to cited author]
>
> I don't believe in the whole "stealing" notion.
Tom, you're starting to make me think you don't believe in
intellectual property. :-)
As in so many things, the best solution (if not exactly ideal)
is political, rather than technological. If the files are to be
freely usable by anybody, then this guy should contact the admins
at the sites that are linking to his, and ask them to copy the files.
If they are not meant to be, he should include terms-of-use notices
with the files. Then, if they persist, he has some recourse.
--
John Porter
Put it on a plate, son. You'll enjoy it more.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 25 May 1999 17:25:37 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: need an anti-leech script
Message-Id: <7iemeh$dvp$1@news.NERO.NET>
In article <slrn7klffn.qs5.sholden@pgrad.cs.usyd.edu.au>,
Sam Holden <sholden@cs.usyd.edu.au> wrote:
>On 25 May 1999 09:01:18 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>>I don't understand this whole "permission" thing. If it's out
>>there, it's out there. Shall we forbid search engines like
>>Alta Vista now?
>
>Search engines tend not to link directly to image files last time I
>looked...
The last time I allowed indexing, both AltaVista and McKinley.com
retrieved images as part of their indexing. At the time, I had only
7000+ images for them to wallow through, and only an IPC running CERN's
server. This was before AltaVista announced itself open for business,
and my calculations showed that my site was a non-trivial percentage of
the number of links they bragged about having indexed. All the other
indexers, at the time, were indexing images, and told me that they should
be allowed to do it because they could do it better than I was already
doing it.
>If someone uses large graphics in the design of their web pages and those
>graphics use up a lot of bandwidth they probably don't like the idea of those
>graphics being embedded into other pages.
If someone has spent the money or time creating a graphic that helps
give identity to a site, then they probably don't like seeing it show up
on other people's pages.
We've spent a lot of money and time developing the system to collect the
images I have here, and I was not happy to find them being claimed by an
aquarium as theirs. I was even less happy finding them on the website
for a commercial TV station, without credit, and with a refresh of 30
seconds -- for an image that changed at most once per hour and never
changed after dark.
>>:just as part of the site they are made for, not for every other site
>>:on the web.
>>
>>I disagree.
Talk to O'Reilly about the use of the Camel image. They seem to differ
with you.
>>I don't believe in the whole "stealing" notion.
Talk to O'Reilly.
------------------------------
Date: 25 May 1999 17:36:48 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: need an anti-leech script
Message-Id: <7ien3g$eav$1@news.NERO.NET>
In article <7iekt5$436$1@nnrp1.deja.com>,
John Porter <jdporter@min.net> wrote:
>As in so many things, the best solution (if not exactly ideal)
>is political, rather than technological. If the files are to be
>freely usable by anybody, then this guy should contact the admins
>at the sites that are linking to his, and ask them to copy the files.
>If they are not meant to be, he should include terms-of-use notices
>with the files. Then, if they persist, he has some recourse.
Sometimes the best solution is technological.
When I caught an NBC television station using my images without a
single line of credit, a link that implied they came from someone
else, and next to an ad for PacBell, the long answer was to discuss
intellectual property rights with them.
The short answer was to create a script that checked the referrer and
return an image advertising ABC programs at the appropriate time. A big
yellow image, with the "abc" happy-face, saying "We Love TV" or "We
Love Drew, Wed 9PM Channel 12" on an official NBC web page was ROTFL
hilarious. At the time, this image was a full quarter of the main page.
When someone gives you control over the content on their web page
without a contract saying what you will put there, or even a handshake
agreement (by simply asking permission) they are a fool. If their
website starts containing offensive material, whose fault is it?
------------------------------
Date: 25 May 1999 11:51:21 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: need an anti-leech script
Message-Id: <374ae319@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
John Porter <jdporter@min.net> writes:
:> I don't believe in the whole "stealing" notion.
:Tom, you're starting to make me think you don't believe in
:intellectual property. :-)
No, I'm referring uniquely to the situation of people clicking
on your public web pages. If you didn't want them to do that,
you wouldn't make it public. Since you have, you can't complain
when the web extends strands in your direction.
--tom
--
pos += screamnext[pos] /* does this goof up anywhere? */
--Larry Wall in util.c from the perl source code
------------------------------
Date: Tue, 25 May 1999 16:54:56 GMT
From: Corus <corus@my-dejanews.com>
To: gbacon@itsc.uah.edu
Subject: Re: Perl compiler...If or when
Message-Id: <7iekku$3v4$1@nnrp1.deja.com>
> The "decompiler" already exists! I imagine people will be much more
> motivated to work on the decompiler than the compiler if, for nothing
> else, to thwart the efforts of evil source hoarders.
Redefine your notion of evil.
A person who without permission tries to "borrow" someone elses code is
in the eyes of Science as evil as the person trying to keep it from him.
In the eyes of *copyright* law, there is only one culprit.
> The problem of someone depriving you of your rights to your
> intellectual property is a social one, not a technical one.
So is the problem of people wanting to steal your Hi-Fi but I bet you
locked your door when you left home this morning.
>Larry's giving away something of such
> tremendous value as perl is a fine example for us all.
Yes I agree, in Larry Walls action, we see the notion of open source
software realised in all its glory.
However as *Perl scripters* we find this notion imposed upon us whether
we want to follow his example or not. At least as long as we choose to
remain Perl scripters.
>
> : A language's or OS's strength lies its popularity. Obviously
popularity
> : is a factor of marketing as well as value that the end-user will
attain
> : from its use.
>
> I don't care how popular MS Exchange is, it still sucks.
Personally I've never even seen MS Exchange but I'll take your word for
it.(MS has given me no reason to doubt you ;-)
However you seem to have failed to see that I have expressed
*popularity* as a product of marketing * value, and in no way have I
suggested a relationship between popularity and actual value to the
user. (which in this case is probably NULL)
> So does gcc fail to be a compiler (standards issues aside) when I
invoke
> it as
>
> % gcc -o /dev/null hello.c
Oops. you got me there.
(Although I would swear the compiler spits out a binary even in this
case, it just gets dumped in a black hole :)
> Why must Perl help people who won't help themselves? The people in
> your scenario had legal recourse. Still, I wonder why they would
> hire people they couldn't trust.
They did when they hired them.
But they probably forgot to subject them to a lie detector test.
Not to mention that you seem to be assuming that the guilty parties get
caught.
Imagine a scenario where you've worked hard for a year building a
website only to find that 2 months after its launch a site offering
identical functionallity springs up. The only difference being that this
one is 3 times as fast as yours.
You know why? Because they didn't have any development costs.
All their funds have gone towards the building of their infrastructure.
What I hear you cry is the problem with this new state of affairs?
Why can't we have generic sites or applications that you can customise
and re-deploy as you see fit?
What's wrong with getting websites/software out of a "box" irrespective
of whether this box was stolen, borrowed or bought?
Who stands to gain and who stands to lose?
If you believe that Science and the individual stand to gain then you're
very much mistaken.
Look at 80% of Microsoft programmers and users who bought magic in a box
and now click and drag with out knowing about the magic behind it all.
The "who stands to gain" is left as an exercise to the reader.
(I'll help you, advertising, telecomms, hardware manufacturers)
Is this they way you see for Science to go forward?
>
> How many times do we have to tell you that
> there's already a "decompiler"?
'Resistance is futile' I hear you shout. The days of people taking
credit for their own efforts are over! (And please let's keep idealism
at bay by recognising money its place in our society)
Long live plagiarism. Long live decompilers who allow us to obtain and
modify other peoples code to suit our needs.
And in this sense, plagiarism doesn't refer to the use of modules of
reusable code as building blocks of a final system but to the
unauthorised replication of "information management systems" the authors
of which worked hard to assemble them and glue them together.
And before anyone else accusses me of being a hoarder let me get one
point accross loud and clear:
I believe that we are all entitled to maintaining our own views about
the world and in this particular case software.
As I mentioned in my previous post, there are certain types of software
whose authors benefit from it being open source and there are other
types of software for which open source is just not a viable option.
The ultimate decision on which way to go should be left to the developer
and not to the suppliers of the tools that he uses to create his work.
Perl is more than a programming language. It's a way of life.
It stands for a world, where all people share each others possessions,
be it a virtual one such as the internet.
It *IS* intellectual communism. Are we as a global society ready for it?
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 25 May 1999 17:48:32 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Perl compiler...If or when
Message-Id: <7ienpg$rg3$1@info2.uah.edu>
In article <7iekku$3v4$1@nnrp1.deja.com>,
Corus <corus@my-dejanews.com> writes:
: > The "decompiler" already exists! I imagine people will be much more
: > motivated to work on the decompiler than the compiler if, for nothing
: > else, to thwart the efforts of evil source hoarders.
:
: Redefine your notion of evil.
I will when I see the need. Do you suppose there would even be an
Internet if people had greedily hoarded their precious source and
tried to squeeze out every last penny?
: A person who without permission tries to "borrow" someone elses code is
: in the eyes of Science as evil as the person trying to keep it from him.
: In the eyes of *copyright* law, there is only one culprit.
Evil breeds more evil. Why do you suppose our hoarder was trying to
keep his knowledge from everyone else? Follow this river of evil to
its source, and you'll be disappointed at what you find.
: > The problem of someone depriving you of your rights to your
: > intellectual property is a social one, not a technical one.
:
: So is the problem of people wanting to steal your Hi-Fi but I bet you
: locked your door when you left home this morning.
Locks only keep honest people out. I have windows all around my house.
Glass is a notoriously brittle material, and it's fairly trivial to
break through. In all honesty, I can do nothing to stop a sufficiently
motivated person from breaking into my house. I could resort to
building twenty-foot concrete walls and posting armed guards, but I'll
just stick with the social solutions like locks and the police.
: >Larry's giving away something of such
: > tremendous value as perl is a fine example for us all.
:
: Yes I agree, in Larry Walls action, we see the notion of open source
: software realised in all its glory.
:
: However as *Perl scripters* we find this notion imposed upon us whether
: we want to follow his example or not. At least as long as we choose to
: remain Perl scripters.
I don't think there is a Perl programmer who would shed even a single
tear if the door were to hit any source hoarder on the ass on his way
out.
[your pathetic excuse for a newsreader miswrapped this section.]
: > So does gcc fail to be a compiler (standards issues aside) when I invoke
: > it as
: >
: > % gcc -o /dev/null hello.c
:
: Oops. you got me there.
: (Although I would swear the compiler spits out a binary even in this
: case, it just gets dumped in a black hole :)
How do you know? What if gcc or some other compiler checks to see
whether its output is going to the bitbucket and skips the code
generation phase? It would still be a compiler despite any ad hoc
definitions or assumptions you may have formulated for yourself despite
the well established definitions of computer science.
I really hate explaining this to someone and then having that person
turn around and argue that a compiler must generate native code.
It's like trying to convince someone that the earth really is round.
: > Why must Perl help people who won't help themselves? The people in
: > your scenario had legal recourse. Still, I wonder why they would
: > hire people they couldn't trust.
:
: They did when they hired them.
: But they probably forgot to subject them to a lie detector test.
It seems an absurd business practice to me for a startup that is walking
such a fine financial line to take a risk like hiring a total stranger.
: Not to mention that you seem to be assuming that the guilty parties
: get caught. Imagine a scenario where you've worked hard for a year
: building a website only to find that 2 months after its launch a site
: offering identical functionallity springs up. The only difference being
: that this one is 3 times as fast as yours. You know why? Because
: they didn't have any development costs. All their funds have gone
: towards the building of their infrastructure.
If the functionality is identical, then you'd probably have grounds
for a lawsuit. Look at all the books that have been pulled from the
shelves because they stole from Perl's documentation. I'm sure Tom
could enumerate each and every one if you're really interested in
knowing.
: The "who stands to gain" is left as an exercise to the reader.
: (I'll help you, advertising, telecomms, hardware manufacturers)
I don't see how your conclusion follows logically.
: Is this they way you see for Science to go forward?
Do you claim that we'll make progress by hiding our information and
knowledge from one another? Part of the patent and copyright processes
is *disclosing* the new technology or expression.
: > How many times do we have to tell you that
: > there's already a "decompiler"?
:
: 'Resistance is futile' I hear you shout. The days of people taking
: credit for their own efforts are over!
Bullshit. Dispense immediately with your FUD. It will only harm your
credibility here.
: (And please let's keep idealism
: at bay by recognising money its place in our society)
You're heading toward a very tired and very old argument. It *is*
quite possible to make *lots* of money with open source software.
Read ESR's excellent case at <URL:http://www.opensource.org/for-suits.html>.
: Long live plagiarism.
More FUD. Strike two.
: Long live decompilers who allow us to obtain and
: modify other peoples code to suit our needs.
If this is honestly how you believe, then you are a hypocrite of the
worst sort for using perl. Stick by your convictions and delete every
copy of perl and its source that you have obtained to suit your needs.
Send a check to Larry for $1000. After that, you'll cease to be a
hypocrite and may resume using perl to suit your needs.
: And before anyone else accusses me of being a hoarder let me get one
: point accross loud and clear:
:
: I believe that we are all entitled to maintaining our own views about
: the world and in this particular case software.
You're entitled to believe that the world is flat or that men never
landed on the moon or that the next millenium begins in less than one
year. You're even entitled to believe that the sum of one and one is
three. Just don't try to participate in serious discussions with
intelligent people.
: As I mentioned in my previous post, there are certain types of software
: whose authors benefit from it being open source and there are other
: types of software for which open source is just not a viable option.
I know of a place inhabited by pink elephants with purple spots. Anyone
can make vacuous claims. They carry no weight without examples.
: Perl is more than a programming language. It's a way of life.
Now you're catching on.
: It stands for a world, where all people share each others possessions,
: be it a virtual one such as the internet.
:
: It *IS* intellectual communism. Are we as a global society ready for it?
Nope. We share with each other, but we don't share ownership and
control. Even capitalists share with one another.
Greg
--
Why do people give each other flowers? To celebrate various important
occasions, they're killing living creatures? Why restrict it to plants?
"Sweetheart, let's make up. Have this deceased squirrel."
-- Jerry Seinfeld
------------------------------
Date: 25 May 1999 11:49:56 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl compiler...If or when
Message-Id: <374ae2c4@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, Corus <corus@my-dejanews.com> writes:
:Perl is more than a programming language. It's a way of life.
That's true.
:It stands for a world, where all people share each others possessions,
And that's hogwash. Next time, I'll use stronger worlds.
:be it a virtual one such as the internet.
:
:It *IS* intellectual communism. Are we as a global society ready for it?
And so science is "communism", too, right? And this is bad? Let's just
hide all of our scientific research, all our scientific advances, all
our scientific knowledge. What a fine world that will be!
You're using the word "communism" for its connotations, not its
denotations. That's dirty pool.
No, of course you don't have to add to the sum of human knowledge,
whether it be pure science, computing science, or just plain programming.
But no one here is under any obligation to help you, and as you see,
few are so inclined. If we all played the sickening Game of Greed,
we'd all be worse off for it. Fortunately, most of us choose not to.
Welcome to the Hacker Culture:
@Culture::Hacker::ISA = qw/Culture::Art Culture::Math/;
Notice that Culture::Avarice appears not at all. Welcome to
our world.
--tom
Culture notes at => http://www.webpedia.com/features/interviews/tchrist/
--
I use `batshit' in an idiosyncratic fashion. --Andrew Hume
------------------------------
Date: 25 May 1999 11:58:35 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl compiler...If or when
Message-Id: <374ae4cb@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, Greg Bacon <gbacon@cs.uah.edu> writes:
:You're heading toward a very tired and very old argument. It *is*
:quite possible to make *lots* of money with open source software.
Them: The objection of many people to open-source software is that
creating it seems to require a certain level of (for lack of a better
word) wealth. You can create great software and if you give it away it
probably will gain wider acceptance than if you sold it. It's been
demonstrated that communities will form around open-source software
and that these communities can do mighty things. But what do you eat?
You can have a gift economy in software all you want, but that's
separate from the exchange economies that regulate material goods. It
seems that one has to have either an academic job, in which one's
(comfortable) subsistence is taken care of, or capitalize on fame
in the open-source community by writing books, lecturing, and the
like. What do you think?
Me: I think that's a great question, because it gives me a chance to
dispel a few popularly held myths about open-source software. Writing
free software does not mean casting out all worldly possessions and
adhering to an austere regimen deprived of ``the good life.'' We're
not medieval monks who've taken vows of poverty. That sounds more
like what I perceive to be Richard Stallman's position, which,
to be quite honest, isn't very popular or realistic. As you say,
people have to eat. Richard would rather see someone working at
flipping burgers than writing software that doesn't precisely align
with his counterintuitive notion of free.
My position is much less extreme. Optimally, you should make
a living doing what you most enjoy doing. If programming is that
thing, what's wrong with being paid for it? Absolutely nothing,
and you shouldn't be ashamed of it. I see free software as something
most people are going to do outside of their normal day jobs, not
as a replacement for the same. Think of it as community service, or
volunteer work. Sure, it would be nice to be independently wealthy
and never have to work at all, but if that were the only sort of
programmer who could produce free software, we wouldn't have any.
The average American sits on his butt more than 20 hours a week
doing nothing but watching television. That's more than a half-time
job! Whatever happened to giving something back to the community? If,
as for me, programming is a game for you, a recreational activity,
then why not make it a hobby and pastime? In that faculty, as a
part-time leisure pursuit, everyone can write free software.
You can read more of that here:
http://language.perl.com/ama-int/interview.html
I've since learned that that 20 hours on the boob tube was conservative.
Sigh.
--tom
--
Say aver, but ever, fever,
Neither, leisure, skein, deceiver.
------------------------------
Date: Tue, 25 May 1999 10:01:16 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Permission denied
Message-Id: <374AD75C.A66F59D5@mail.cor.epa.gov>
Gary L. Carrington wrote:
>
> I am haveing problems creating a file under a scratch directory. I
> chmod the directory to 0666, changed the group ownership to nobody, and
> I still cannot create a file under the directory. I get the error
> message stating Permission denied. How would I correct this problem.
Well, it's pretty hard to guess from here. My PSI::ESP module
seems to be on the blink again. :-)
Seriously, you haven't given us near enough information to
answer your question.
Are you doing this in a Perl program? If so, can you show us
a 10-30 line script which reproduces your problem? If not,
then why are you asking in a Perl programming newsgroup?
Are you doing this in some CGI script? If so, are you checking
that you're reading/writing/modifying the dir you think you
are? Webservers like to lie to you about where things are
running. If this is CGI, then are you reading the errors in
the server log too?
Are you checking all your return codes and printing out
your error messages?
Without more help from you, it's anyone's guess what is wrong.
In fact, right now it's anyone's guess whether you're even
asking in the right newsgroup.
SICBMH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 25 May 1999 11:37:15 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: removings " "s from strings
Message-Id: <374adfcb@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"Daniel Vesma" <daniel.vesma@thewebtree.com> writes:
:>Then you don't have Perl. Please install Perl and consult
:>its documentation.
:
:Yes I do. Running under win98.
s/Running/Suffering/
Listen very carefully:
If you have Perl, you have the documentation.
If you do not have the documentation, you don't have Perl.
That's the simple truth of the matter. Now, do you have
Perl or don't you?
--tom
--
"Make is like Pascal: everybody likes it, so they go in and change it. "
--Dennis Ritchie
------------------------------
Date: Tue, 25 May 1999 12:28:18 -0400
From: digital kensai <kensai@nortel.com>
Subject: Re: Return of array
Message-Id: <374ACFA2.F5B61266@nortel.com>
Dave Cross wrote:
> >ArrayRef.pm
> >###########
> >package ArrayRef;
> >
> >sub new { return bless {}; }
> >
> >sub retArr {
> > my @var = qw(1 2 3);
> > $self->{'var'} = \@var;
> >#return $self->{'var'}; # this is optional
> >}
> >
> >1;
> >
> >arraytest.pl
> >##########
> >#!/usr/bin/perl -w
> >
> >use strict;
> >
> >require('ArrayRef.pm');
> >
> >my ($a, $arrayref);
> >
> >$a = ArrayRef->new;
> >$arrayref = $a->retArr;
> >
> >print @{$arrayref}->[0]; #prints 1
>
> This does work (I've tested it) but I think it's an example of Perl
> doing what it thinks you want it to do when you're being unclear (can
> anyone confirm this).
>
> I think that what you're doing is confusing two correct ways of
> accessing the aray contents. These would be:
$arrayref->[0] works, but @{$arrayref}->[0] has the added benefit (IMHO) of
clearly marking exactly what the array is ($arrayref is NOT the array, as
$arrayref->[0] visually, and incorrectly, implies).
> # 1. actually still slightly confused as it returns a single element
> # array slice.
> print @{$arrayref}[0];
>
> # 2. Much better
> print $arrayref->[0];
------------------------------
Date: Tue, 25 May 1999 17:18:18 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Web stats & reinvention avoidance.
Message-Id: <7iem1d$q8$1@news.mch.sbs.de>
In article <7ieh60$mv1$1@pheidippides.axion.bt.co.uk>, "Mark Hamlin" <mark@artdigital.co.uk> wrote:
>Where & what is the best source to start from in the arena of web page
>traffic statistics analysis, If there is a free script that can do
>everything it would be time well saved. I have good server side skills now
>as well as client side javascript so I can jump right into the middle of
>something and manipulate for my own situation.
>
>Requirements:
>
>1: Free
>2: Stats by number of different users.
>3: Pretty graphics,
[snip]
Have you had a look at the CGI Resource Index ? There are quite a few
access statistics tools there :
http://cgi.resourceindex.
com/Programs_and_Scripts/Perl/Logging_Accesses_and_Statistics/
Obviously, I recommend my own tool :-)
Note that you'll only get the graphics by using 'fly' and aWebVisit-Map (CGI).
Michel.
--
aWebVisit - extracts visitor information from WWW logfiles and shows
the top entry, transit, exit and 'hit&run' pages, the links followed
inside your website, the time spent per page, the visit duration etc.
For more details, see http://gallery.uunet.be/Michel.Dalle/awv.html
------------------------------
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 5776
**************************************