[13856] in Perl-Users-Digest
Perl-Users Digest, Issue: 1266 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 3 12:10:32 1999
Date: Wed, 3 Nov 1999 09:10:18 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941649018-v9-i1266@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 3 Nov 1999 Volume: 9 Number: 1266
Today's topics:
perl and commonsense ajmayo@my-deja.com
Re: perl and commonsense (brian d foy)
Re: perl and commonsense <jeffp@crusoe.net>
Re: perl and commonsense (Bill Moseley)
Re: perl and commonsense <ltl@rgsun5.viasystems.com>
Re: Perl Newbie <gellyfish@gellyfish.com>
Re: Problem With Delimited Field Sort <klessa@airmail.net>
Re: Problem With Delimited Field Sort (Kragen Sitaker)
Problems installing ActivePerl build 522 <psteele@opticalnetworks.com>
Running perl on NT <tec@amherst.com>
Re: Running perl on NT <gellyfish@gellyfish.com>
shared memory and semaphores <the_ferret@my-deja.com>
Re: speeding up split() <r28629@email.sps.mot.com>
Re: to Alan Flavell (Mark W. Schumann)
Using Perl on an NT Platform patelni101480@my-deja.com
Re: Using Perl on an NT Platform <gellyfish@gellyfish.com>
Re: VMS user authentication <dan@tuatha.sidhe.org>
Re: VMS user authentication <dan@tuatha.sidhe.org>
What does HAND mean? <scottlm@visi.com>
Re: What does HAND mean? <gellyfish@gellyfish.com>
Re: What makes the web go? <camerond@mail.uca.edu>
Why am I getting an undefined subroutine error? <psteele@opticalnetworks.com>
Why not DB_File? <shaft@meanmutha.com>
Re: Year 2000 date problem <uri@sysarch.com>
Re: Year 2000 date problem (Randal L. Schwartz)
Re: Year 2000 date problem <tyndiuk@ftls.org>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 03 Nov 1999 14:19:07 GMT
From: ajmayo@my-deja.com
Subject: perl and commonsense
Message-Id: <7vpg8n$s8g$1@nnrp1.deja.com>
I am slowly making the transition from perl newbie to novice guru. In
doing so, I've found some issues that I don't have good answers to.
I work in a whole bunch of languages, including C, Javascript and
Visual Basic. None are perfect. But perl seems to get me scratching my
head most often - and my colleagues, too, find it tough going.
What I find with perl is that extrapolation from common sense seldom
works.
Take the following example. I want to create a reference to an array
slice. Common-sense extrapolation would indicate that if
$c=\@a;
creates a reference to the array @a and places it in the scalar $c,
and if
@d=@a[0..2]; copies the array slice $a[0] through $a[2] to array @d,
then clearly,
$c=\@a[0..2];
will create a reference to the array slice. Except it doesn't work. It
seems to evaluate the slice in scalar context, returning 3 in this case.
Now, I have searched the online perl documentation and I can't clarify
whether this should work, or not. The problem seems to be that perl is
just too subtle and clever, and the documentation presupposes that you
will be just as subtle and clever. This may be why it is organised in
the peculiar way that it is, compared to most programming language
documentation, which tends to be task-oriented. I mean, it makes
perfect sense to look in "perl syntax" to see how a for loop is
constructed, from the language developers point of view, but maybe not
from the point of view of someone learning the language. I know
what 'syntax' is but my colleague, looking for 'loop control' was
surprised when I told him where to look.
Compared with the clean elegance of Javascript, perl suffers very badly
from metacharacter madness. The result is that perl programming is not
a part-time pursuit, but more a life calling. This may explain the zeal
with which its experts pursue the most obscure and cunning perl
epigrams.
My life isn't helped by perl's infuriating error reporting, which
assumes that printing the line number is sufficient. This is not the
case!. If the code is running inside of Apache (mod_perl) the line
number is meaningless. I want to see the error reported in context e.g
$foo=$bar+$glarch;
^undefined variable $bar
like I would in most development environments. Not to mention
$foo=($bar+($glarch+3/$foo);
^Expected ')'
Now you might quite reasonably ask why I would persevere with perl if
it doesn't make my life easier. The thing is, right now, its the only
server-side language with infrastructure (e.g DBI for database access)
that I can use with both Microsoft IIS and Apache. Server-side
javascript is emerging but the infrastructure, like database access,
isn't really there yet.
So unless I want to go with weird stuff like PHP and abandon IIS - not
always an option, because some customers want to use it - then Perl is
my only choice.
This being the case, I would love to know what others think. Apart from
the full-time perl gurus, who will probably sneer at my ignorance, what
do you part-time perl programmers think?. Once you start using the more
advanced language features, are you having trouble getting predictable
results?. Does common-sense extrapolation work for you? Has your code
turned out to be maintainable?. And does the limited error message
reporting cause you a problem,especially with server-side perl code?.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 03 Nov 1999 10:31:26 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: perl and commonsense
Message-Id: <brian-0311991031270001@183.new-york-58-59rs.ny.dial-access.att.net>
In article <7vpg8n$s8g$1@nnrp1.deja.com>, ajmayo@my-deja.com wrote:
>I am slowly making the transition from perl newbie to novice guru. In
>doing so, I've found some issues that I don't have good answers to.
>What I find with perl is that extrapolation from common sense seldom
>works.
no computer langauge has anything to do with common sense. they
operate under a set of rules. understand the rules and you understand
the langauge. if you don't understand the language, then you are
probably missing something about the rules.
>Take the following example. I want to create a reference to an array
>slice. Common-sense extrapolation would indicate that if
>
>$c=\@a;
>
>creates a reference to the array @a and places it in the scalar $c,
>and if
>
>@d=@a[0..2]; copies the array slice $a[0] through $a[2] to array @d,
>then clearly,
>
>$c=\@a[0..2];
>
>will create a reference to the array slice. Except it doesn't work. It
>seems to evaluate the slice in scalar context, returning 3 in this case.
why does that clearly create a reference to an array slice? you can
create a reference to an array, but the result of an array slice is
not an array. after reading both of your posts it sounds like you
jump into coding much too quickly and neglect to fully learn what you
are doing - this is certainly the trap of task-oriented references
which you mentioned. perhaps you'd like the Perl Cookbook if the
Camel is not to your liking. still, you have to learn the rules of
Perl rather than trying to apply guesses or concepts from other
languages to it.
>Now, I have searched the online perl documentation and I can't clarify
>whether this should work, or not. The problem seems to be that perl is
>just too subtle and clever, and the documentation presupposes that you
>will be just as subtle and clever. This may be why it is organised in
>the peculiar way that it is, compared to most programming language
>documentation, which tends to be task-oriented.
i'm not sure what you mean by "most". you seem to have limited
experience with programming documentation. a lot of javascript
documentation is task oriented because it's aimed at cut-and-paste
programmers.
>I mean, it makes
>perfect sense to look in "perl syntax" to see how a for loop is
>constructed, from the language developers point of view, but maybe not
>from the point of view of someone learning the language. I know
>what 'syntax' is but my colleague, looking for 'loop control' was
>surprised when I told him where to look.
perhaps you colleague just needs a bit of experience and a
dictionary. the word "syntax" is not obscure even in normal
conversation, and is very common in language references. the perl
man page has a list of all of the perl man pages along with a
short description of what is in them.
>Compared with the clean elegance of Javascript, perl suffers very badly
>from metacharacter madness.
i can't decide whether or not that is a troll. Perl is a general
purpose programming langauge. it's a power tool, and like any power
tool, there's a bit more involved in it's use. it sounds like
Javascript was your first language and you suffer from a love of it.
you're certainly the first person i've ever heard calling LiveScript
elegant or clean.
>My life isn't helped by perl's infuriating error reporting, which
>assumes that printing the line number is sufficient. This is not the
>case!.
i'm not sure what you mean. perhaps you are not using the -w switch
to enable warnings, or do not know about the 'use diagnostics' pragma.
Perl can give copious amounts of information for warning, but you have
to ask for it.
--
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ
<URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Wed, 3 Nov 1999 10:34:54 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: perl and commonsense
Message-Id: <Pine.GSO.4.10.9911031026410.12955-100000@crusoe.crusoe.net>
[posted & mailed]
It is not you who decides you are a guru.
> @d=@a[0..2]; copies the array slice $a[0] through $a[2] to array @d,
@d = @a[0..2]; # and
@d = ($a[0],$a[1],$a[2]); # are the same
# @foo[a..b] returns a list of scalars
> $c=\@a[0..2];
> seems to evaluate the slice in scalar context, returning 3 in this case.
No, it doesn't. Let me show you this:
@a = qw( a b c );
$a = \@a[1,2];
print $$a;
c
That is the same as saying:
$a = \($a[1], $a[2]);
# which is the same as
$a = (\$a[1], \$a[2]);
# which is the same as
$a = \$a[2];
[comments regarding mod_perl skipped; I don't use it]
I used to be a part-time Perl programmer until I decided to find out WHY I
was getting results I didn't understand. I better grok the language know.
It's much easier if you take the time to understand why Perl does things
its way, rather than some other language's way.
Once I started using advanced features, I was ready for them.
--
MIDN 4/C PINYAN, USNR, NROTCURPI
jeff pinyan japhy@pobox.com
perl stuff japhy+perl@pobox.com
CPAN ID: PINYAN http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
------------------------------
Date: Wed, 3 Nov 1999 07:35:11 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: perl and commonsense
Message-Id: <MPG.1289f605d38a916598983c@nntp1.ba.best.com>
ajmayo@my-deja.com (ajmayo@my-deja.com) seems to say...
> I am slowly making the transition from perl newbie to novice guru. In
> doing so, I've found some issues that I don't have good answers to.
That's why people are here to help.
> Now, I have searched the online perl documentation and I can't clarify
> whether this should work, or not. The problem seems to be that perl is
> just too subtle and clever, and the documentation presupposes that you
> will be just as subtle and clever. This may be why it is organised in
> the peculiar way that it is, compared to most programming language
> documentation, which tends to be task-oriented. I mean, it makes
> perfect sense to look in "perl syntax" to see how a for loop is
> constructed, from the language developers point of view, but maybe not
> from the point of view of someone learning the language. I know
> what 'syntax' is but my colleague, looking for 'loop control' was
> surprised when I told him where to look.
Here we go again!
Your common sense is not everyone else's.
There are many books on Perl that present the information in a different
format. Pick the one that you like.
> This being the case, I would love to know what others think. Apart from
> the full-time perl gurus, who will probably sneer at my ignorance, what
> do you part-time perl programmers think?. Once you start using the more
> advanced language features, are you having trouble getting predictable
> results?. Does common-sense extrapolation work for you? Has your code
> turned out to be maintainable?. And does the limited error message
> reporting cause you a problem,especially with server-side perl code?.
Why does commonsense have anything to do with it? It's a programming
language with a manual. Commonsense tells me my VCR should work
differently than it does, but I still have to use the manual to program
it.
Yes, the more complicated tasks I do the more mistakes I make, and the
more I have to try to understand. It often takes me a number of
readings of the docs to understand what's not working the way I think.
It's my problem, not the language, though.
Debugging inside Apache has been a little confusing, true, but I'm just
running inside of Apache::Registry, so I can test outside of Apache.
The important thing is to write perfect code at all time.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: 3 Nov 1999 16:21:29 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: perl and commonsense
Message-Id: <7vpne9$kp4$1@rguxd.viasystems.com>
ajmayo@my-deja.com wrote:
:>I am slowly making the transition from perl newbie to novice guru. In
:>doing so, I've found some issues that I don't have good answers to.
Given what you wrote, you are only a few short weeks (or maybe a
month) away from being to the point where these things won't surprise
you (or at least not very often). Many times you can try things that
seem "commonsense" and they will work like you expect. The trick is
to get enough experience to know where to look when they don't. You
are very close. If the learning curve was smooth (and it isn't, but
that is another topic), then you are probably right at the cusp where
it switches from "mostly still learning" to "mostly already know and
know where to look when you don't." Do not despair.
Consider that the definition of commonsense changes as you learn more
about the internals of how Perl does things. The particular problem
you stated about taking a reference to an array slice is explained
when you learn that an array slice is "a list of scalar values that
happen to come from an array". You can't take a reference to a
list. There are other ways to do what you want like:
my $arrref = [ @some_array[@some_indexes] ];
This copies the values and so may not be exactly what you wanted.
For example you cannot make changes to the values in the original
array from $arrref.
As for the error messages from modperl, I don't use it extensively
and don't know the answer. But I would place a reasonable wager
that the problem of associating the line number from an error message
with a particular line in your code is one that has been addressed
somewhere. If it hasn't, then that might be a nice thing to work
on in your spare time. ;-) But first look at the FAQs for modperl,
which is what I would do before actually placing a wager with
anything besides my pride. :-)
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: 3 Nov 1999 14:15:04 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Newbie
Message-Id: <38204368_2@newsread3.dircon.co.uk>
Arctor002 <arctor002@aol.com> wrote:
> Dude, they're snotty and they're gonna flame ya. Don't be discouraged, just go
> here:
Oh my word - I didnt see anyone get snotty, I didnt see anyone get flamed,
I did see an AOLer get killfiled however ...
/J\
--
"Michael Ancram, you haven't got a hope in hell of winning the next
election" - Huw Edwards, BBC News
------------------------------
Date: Wed, 03 Nov 1999 14:20:51 GMT
From: Kat <klessa@airmail.net>
Subject: Re: Problem With Delimited Field Sort
Message-Id: <7vpgc0$sb0$1@nnrp1.deja.com>
In article <KbMT3.28481$m4.101918295@news.magma.ca>,
"Samuel Kilchenmann" <skilchen@swissonline.ch> wrote:
> Kat <klessa@airmail.net> wrote in message
> news:7vnq7f$mid$1@nnrp1.deja.com...
> >
> > It's from the effectiveperl site, url:
> >
> > http://www.effectiveperl.com/recipes/sorting.html#delimited_strings
> >
> Thats a very interestig site! Thanks for the link.
Glad to help -- I agree, I just stumbled upon it, and I thought the
recipes section was organized quite well and instantly bookmarked the
thing for future use!
> As Joe Petolino already pointed out, this is a Perl version problem.
> You may want to try if it works with your older Perl if you make the
> following modifications:
> return
> map $_->[0],
> sort { &{$sortfunc}() }
> map [$_, &{$splitfunc}($_)],
> @_;
And as well, slightly modifying the call to the fieldsort function.
Now it works perfectly with the older version of Perl as well.
Which brings me to a question -- is one version more efficient than the
other? I'm wondering whether I should use this modified call to keep
it functional regardless of perl version, or if there is a compelling
reason to use the original syntax.
Thanks so much to everyone for the rapid and HELPFUL response. Hope to
someday return the favor.
Kathy
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 03 Nov 1999 16:20:13 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Problem With Delimited Field Sort
Message-Id: <1hZT3.24407$23.1282702@typ11.nn.bcandid.com>
In article <7vpgc0$sb0$1@nnrp1.deja.com>, Kat <klessa@airmail.net> wrote:
>In article <KbMT3.28481$m4.101918295@news.magma.ca>,
> "Samuel Kilchenmann" <skilchen@swissonline.ch> wrote:
>> return
>> map $_->[0],
>> sort { &{$sortfunc}() }
>> map [$_, &{$splitfunc}($_)],
>> @_;
>
>And as well, slightly modifying the call to the fieldsort function.
>Now it works perfectly with the older version of Perl as well.
>
>Which brings me to a question -- is one version more efficient than the
>other? I'm wondering whether I should use this modified call to keep
>it functional regardless of perl version, or if there is a compelling
>reason to use the original syntax.
I don't know. I think they're exactly the same thing, though, just
written differently. I suppose I could find out with B::.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 3 Nov 1999 08:42:06 -0800
From: "Peter Steele" <psteele@opticalnetworks.com>
Subject: Problems installing ActivePerl build 522
Message-Id: <4CZT3.167$YE5.1666@client>
I just downloaded the new ActivePerl build 522 from activestate.com and at
about 80% through the installation process I get the error
"cannot create Perl interpreter"
and it aborts the installation. I ran the installer on a just booted system
with no other apps running. Does anyone know what might be causing this
error?
------------------------------
Date: Wed, 3 Nov 1999 08:22:08 -0600
From: "Tim Curry" <tec@amherst.com>
Subject: Running perl on NT
Message-Id: <DwXT3.24217$23.1266749@typ11.nn.bcandid.com>
I am running a very simple perl script on an NT machine. I have installed
perl and changed my permissions of the perl file. When I execute my form,
the perl script is called. The perl script executes ok in a DOS shell, but
when internet explorer executes it it simply writes the perl script to the
window.
Thanks for your help.
------------------------------
Date: 3 Nov 1999 14:27:07 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Running perl on NT
Message-Id: <3820463b_2@newsread3.dircon.co.uk>
In comp.lang.perl.misc Tim Curry <tec@amherst.com> wrote:
> I am running a very simple perl script on an NT machine. I have installed
> perl and changed my permissions of the perl file. When I execute my form,
> the perl script is called. The perl script executes ok in a DOS shell, but
> when internet explorer executes it it simply writes the perl script to the
> window.
>
Sounds like a question for comp.infosystems.www.servers.ms-windows to me ...
/J\
--
"Buzz Aldrin was the second man to walk on the moon and the first to
fill his pants" - Violet Berlin, The Big Bang
------------------------------
Date: Wed, 03 Nov 1999 16:43:34 GMT
From: Bruce <the_ferret@my-deja.com>
Subject: shared memory and semaphores
Message-Id: <7vponm$2th$1@nnrp1.deja.com>
I know that perl offers some functions for System V shared memory and
System V semaphores. That's fine when I'm developing on Solaris.
However, for the project on which I'm currently working, the client is
using Red Hat Linux.
Can someone offer me a definitive answer, information from experience or
point me to a website regarding the use of these same functions on
Linux?
Thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 03 Nov 1999 08:51:33 -0500
From: TK Soh <r28629@email.sps.mot.com>
Subject: Re: speeding up split()
Message-Id: <38203DE5.9CD8F444@email.sps.mot.com>
Ilya Zakharevich wrote:
>
> [A complimentary Cc of this posting was sent to TK Soh
> <r28629@email.sps.mot.com>],
> who wrote in article <381F29B6.C8F9695A@email.sps.mot.com>:
> > > Or alternatively, support my patch which introduced a pragma to kill
> > > this splitting-to-$@ bug.
> >
> > I would really like to try it out. where can I find this patch? I looked
> > up the CPAN but couldn't quite locate it (or have I taken it too
> > literally ? :) :
>
> It was something like use explicit 'split' or somesuch.
I have looked into all the .gz and .zip in ./patches/ , but couldn't
find the keyword 'explicit' with 'split'. Perhaps I am looking the wrong
way?
-TK
------------------------------
Date: 3 Nov 1999 10:54:53 -0500
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: to Alan Flavell
Message-Id: <7vplsd$a80@junior.apk.net>
In article <7vidh1$2lr$1@gellyfish.btinternet.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>Hoo, delightful. Diane asks off-topic question, Alan points Diane to the
>very answer she is looking for in (admittedly) another resource, Diane
>tells Alan to Fuck Off, usenauts put Diane in killfile. Simple, elegant:
>a microcosm of late twentieth century life really.
Not to mention that "to Alan Flavell" is a pretty presumptious subject
line for a newsgroup post. As if it's his job to watch the newsgroup
for her.
------------------------------
Date: Wed, 03 Nov 1999 15:20:18 GMT
From: patelni101480@my-deja.com
Subject: Using Perl on an NT Platform
Message-Id: <7vpjrd$v7g$1@nnrp1.deja.com>
I am trying to get Perl to use the NT command called shutdown. This
command allows me to shutdown other computers on a network. In Perl I
know there is a command called system, that would let me use shutdown.
But when I try to use it, it gives me all the different shutdown
options, it won't actually shutdown the machine. I can shutdown my own
local computer, but I can't shutdown other computers on a network.
Anyone have any suggestions???
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 3 Nov 1999 16:50:14 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Using Perl on an NT Platform
Message-Id: <382067c6_1@newsread3.dircon.co.uk>
patelni101480@my-deja.com wrote:
> I am trying to get Perl to use the NT command called shutdown. This
> command allows me to shutdown other computers on a network. In Perl I
> know there is a command called system, that would let me use shutdown.
> But when I try to use it, it gives me all the different shutdown
> options, it won't actually shutdown the machine. I can shutdown my own
> local computer, but I can't shutdown other computers on a network.
> Anyone have any suggestions???
>
If you are having difficulty with the shutdown command rather than
using system() then you should ask in an NT group - if you are having
trouble with system() itself you should show us some code ...
/J\
--
"Over the years I've always had Max Factor in my box" - Tina Earnshaw,
Chief Make-Up Artist, Titanic
------------------------------
Date: Wed, 03 Nov 1999 16:10:07 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: VMS user authentication
Message-Id: <z7ZT3.861$c06.11997@news.rdc1.ct.home.com>
Tom Phoenix <rootbeer@redcat.com> wrote:
> On Tue, 2 Nov 1999, Matt Williamson wrote:
>> I'm not particularly familiar with the VMS operating system (read
>> quasi-ignorant). Is there an analogous way to do this under OpenVMS?
> If there is, this should probably be how to do it. That is, in general,
> Perl lets you pretend you're on a Unix system when it can. readlink() on a
> Macintosh alias works like readlink() does on a Unix symbolic link.
> flock() on a system which uses lockf(2) works as if your system has
> flock(2) (as much as possible). So Perl on VMS should do the right thing.
Well, up to a point. We don't emulate programs--you get what you get when
you system. Everything else we do ourt best with.
The other issue he's going to run into is security. VMS won't let you get
access to the hashed password for an account without some reasonably
significant privileges. Which is just fine, of course, but it does make
things like this trickier.
Dan
------------------------------
Date: Wed, 03 Nov 1999 16:12:23 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: VMS user authentication
Message-Id: <H9ZT3.863$c06.11997@news.rdc1.ct.home.com>
Matt Williamson <matthew@swt.edu> wrote:
> I'm trying to write a CGI script on a VMS system that authenticates
> usernames and passwords based on the standard VMS login database. I
> accomplished this in UNIX/Linux, but I used some shell calls:
> $pwd = (getpwuid(`id -u $FORM{'user'}`))[1];
And, on a completely non-VMS note...
Do please tell me that the @FORM array has been dealt with such that
$FORM{user} is guaranteed not to have any nasty things in it. (And you
probably ought to chomp the output of the backticks too, since getpwuid's
well within its rights to tell you the user "foo\n" doesn't exist...)
Dan
------------------------------
Date: Wed, 03 Nov 1999 10:48:43 -0600
From: Scott McGerik <scottlm@visi.com>
Subject: What does HAND mean?
Message-Id: <3820676B.93BC6880@visi.com>
Abigail wrote:
> HTH. HAND.
What does HAND mean? I am not familiar with it.
Scott McGerik.
------------------------------
Date: 3 Nov 1999 16:52:08 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: What does HAND mean?
Message-Id: <38206838_1@newsread3.dircon.co.uk>
Scott McGerik <scottlm@visi.com> wrote:
> Abigail wrote:
>
>> HTH. HAND.
>
> What does HAND mean? I am not familiar with it.
>
Its one of those things that most people have on the ends of their arms -
alternatively it might be 'Have A Nice Dingo' ...
/J\
--
"You don't watch the Eurovision Song Contest to hear good music" -
Katrina Leskanich, Katrina and the Waves
------------------------------
Date: Wed, 03 Nov 1999 09:20:08 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: What makes the web go?
Message-Id: <382052A8.91ABB74D@mail.uca.edu>
"Mark W. Schumann" wrote:
>
> Who the hell is this Brian Foy guy anyway? Read a FAQ once in a while,
> kid.
>
> (Cool. I trolled Brian Foy. All in fun, dude.)
Big deal, there is no Brian Foy. However, there is a brian d foy. Read a
sig line once in a while, kid ;) (Remember Perl is case sensitive, and
so is brian - see TPJ #11,p.4.)
Cameron
--
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu
------------------------------
Date: Wed, 3 Nov 1999 08:53:54 -0800
From: "Peter Steele" <psteele@opticalnetworks.com>
Subject: Why am I getting an undefined subroutine error?
Message-Id: <9NZT3.172$YE5.1673@client>
I have Perl installed on my Windows NT system and am trying to make use of
some of packages that are part of the distribution. I tried a very simple
script:
use Net::ping;
print "alive" if pingecho('localhost', 10);
but when I run this I get the error
Undefined subroutine &main::pingecho called at - line 2
Can anyone explain what is causing this error?
------------------------------
Date: Wed, 3 Nov 1999 10:09:32 -0600
From: John Shaft <shaft@meanmutha.com>
Subject: Why not DB_File?
Message-Id: <Pine.LNX.4.10.9911031001090.30482-100000@alfred.laffeycomputer.com>
I have a client that has their server setup so that I cannot use DB_File.
They say that they don't want any "database access" from PERL. I have to
use JSP or Java Servlets or similar.
I am using Db_File to do quick lookups of entries in a hash in a CGI
script. This works great.
Can anyone think of a reason why they would not want to use this? My guess
is they mean connecting to SQL databases or similar where the script would
have to connect with each invocation. Any reasons why DB_File is bad? It
comes standard with PERL, right? It runs find under Solaris?
I guess I'll end up putting this into a text file which WILL slow down
their server...
Any ideas? I need to be able to find a line in a file quickly. The data I
am searching on is the first three characters in the file. The file will
have no more than 1000 lines. am thinking that sequentially reading will
be fast enough. Unless anyone has a good way to do a binary search on
something like this? I could ALWAYS have 1000 lines in the file, but
getting to a certain line number still requires reading every line, right?
There is only one lookup per invocation so creating an index of offsets
(using tell in order to seek to them) would be a waste of time, right?
Thanks for your opinions!
shaft@meanmutha.com
http://www.meanmutha.com
------------------------------
Date: 03 Nov 1999 10:13:10 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Year 2000 date problem
Message-Id: <x7n1sv8v7d.fsf@home.sysarch.com>
>>>>> "FT" == Frederic TYNDIUK <tyndiuk@ftls.org> writes:
FT> The year in perl was "modulo" 100, you chould add 1900 to the year...
FT> try with :
WRONG!! you have the right code below. is that a modulus related
operation? the year returns is simply offset by -1900.
FT> $year += 1900;
<snip of jeopardy quote>
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 03 Nov 1999 07:32:47 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Year 2000 date problem
Message-Id: <m17ljz615s.fsf@halfdome.holdit.com>
>>>>> "Frederic" == Frederic TYNDIUK <tyndiuk@ftls.org> writes:
Frederic> The year in perl was "modulo" 100, you chould add 1900 to the year...
Frederic> try with :
No, it's not. It's year - 1900, just has it has always said in the
documentation that no-one appears to read.
Amazingly enough, for a wrong explanation, you got the right fix
though:
Frederic> $year += 1900;
Congratulations. :)
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Wed, 03 Nov 1999 16:36:29 +0100
From: Frederic TYNDIUK <tyndiuk@ftls.org>
To: Uri Guttman <uri@sysarch.com>
Subject: Re: Year 2000 date problem
Message-Id: <3820567D.99FFBB1@ftls.org>
Uri Guttman wrote:
>
> >>>>> "FT" == Frederic TYNDIUK <tyndiuk@ftls.org> writes:
>
> FT> The year in perl was "modulo" 100, you chould add 1900 to the year...
> FT> try with :
>
> WRONG!! you have the right code below. is that a modulus related
> operation? the year returns is simply offset by -1900.
Sorry I have forgotten the NOT, It's NOT "modulus" operation (1999 %
100) what is the reason why $yr="20year"; doesn't work...
> FT> $year += 1900;
--
*----------------------------------------------------------*
| FTLS E-Mail: - tyndiuk@ftls.org |
|(TYNDIUK Frederic) |
| WWW : - http://www.ftls.org/ |
|CGI Scripts Archive : - http://www.ftls.org/cgi/ |
-----------------------------------------------------------*
------------------------------
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 1266
**************************************