[15721] in Perl-Users-Digest
Perl-Users Digest, Issue: 3134 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 23 14:05:57 2000
Date: Tue, 23 May 2000 11:05:27 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <959105127-v9-i3134@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 23 May 2000 Volume: 9 Number: 3134
Today's topics:
$ENV{'REMOTE_USER'}; <John@expresspayments.com>
Re: $ENV{'REMOTE_USER'}; <jhelman@wsb.com>
Re: % translating ascii to unicode? <flavell@mail.cern.ch>
Re: % translating ascii to unicode? <jeff@vpservices.com>
Re: % translating ascii to unicode? <bill.kemp@wire2.com>
Re: A definition of true? (Colin Watson)
Re: A definition of true? nobull@mail.com
Re: A definition of true? <bmb@dataserv.libs.uga.edu>
Re: About "sprint f" ? (Gary E. Ansok)
Re: activestate Perl5.6 /w win2000? <rootbeer@redcat.com>
Re: apache document_root and virtualHost <rootbeer@redcat.com>
Re: Ask Expert about Perl5 DBM files <rootbeer@redcat.com>
Re: Autoload order (WAS Re: Haiku) <bmb@dataserv.libs.uga.edu>
Re: Basic scripting question <rhomberg@ife.ee.ethz.ch>
Re: Basic scripting question <godzilla@stomp.stomp.tokyo>
Re: Basic scripting question <uri@sysarch.com>
Re: Basic scripting question (brian d foy)
Re: Basic scripting question (Michel Dalle)
Re: Basic scripting question <godzilla@stomp.stomp.tokyo>
Re: Basic scripting question <uri@sysarch.com>
Re: Basic scripting question <chris@cjx.com>
Re: Basic scripting question (Jerome O'Neil)
Re: Basic scripting question <godzilla@stomp.stomp.tokyo>
Re: Basic scripting question <godzilla@stomp.stomp.tokyo>
Re: Basic scripting question <godzilla@stomp.stomp.tokyo>
Re: Building a hash array <rootbeer@redcat.com>
Re: calling sequence of perl scripts <rootbeer@redcat.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 23 May 2000 15:22:20 GMT
From: "John Lawson" <John@expresspayments.com>
Subject: $ENV{'REMOTE_USER'};
Message-Id: <MmxW4.75$An4.50091@paloalto-snr1.gtei.net>
I am still having some problem.
After i login i run a script form the cgi-bin and the $ENV{'REMOTE_USER'}
has no value set to it. do i have to login to the cgi-bin or am i calling it
wrong.
Here is a complete summary. I have a htacess protected directory in the main
directory. after they login to that directory i call a script and want to
know who logged in. i set $user=$ENV{'REMOTE_USER'}; when i print out $user
there is no value i am not sure if it is because i have to login to the
cgi-bin or if i am calling the env wrong.
also Ilja if you reads this again where is the director
"manuals/FAQs/newsgroups".
thanks again
------------------------------
Date: Tue, 23 May 2000 16:00:54 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: $ENV{'REMOTE_USER'};
Message-Id: <392AAB59.B2862F68@wsb.com>
John Lawson wrote:
>
> I am still having some problem.
> After i login i run a script form the cgi-bin and the $ENV{'REMOTE_USER'}
> has no value set to it. do i have to login to the cgi-bin or am i calling it
> wrong.
> Here is a complete summary. I have a htacess protected directory in the main
> directory. after they login to that directory i call a script and want to
> know who logged in. i set $user=$ENV{'REMOTE_USER'}; when i print out $user
> there is no value i am not sure if it is because i have to login to the
> cgi-bin or if i am calling the env wrong.
As this has nothing to do with perl, I hesitate to answer, but...
Your CGI script will only see a defined $ENV{'REMOTE_USER'} if it is
executing within an authentication realm. Since your default /cgi-bin
directory is not in a password protected area (I'm guessing), your
browser is not attempting to send an authentication line in the
request. Either A: Move your script to a cgi directory within the
authentication realm, or B: change the authentication realm to include
your cgi directory (in this case, the whole server).
If you need further assistance on this, I recommend visiting the
appropriate newsgroup for your server.
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
------------------------------
Date: Tue, 23 May 2000 17:32:33 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: % translating ascii to unicode?
Message-Id: <Pine.GHP.4.21.0005231718580.29718-100000@hpplus01.cern.ch>
On Tue, 23 May 2000, Jeff Zucker wrote:
> Unicode has nothing to do with it.
Sorry, I'd have to contradict that: the number which is used in &#nnn;
representations, according to the HTML4 specifications, is the unicode
value of the desired character (irrespective of the document's
character coding or "charset").
In a hostile situation, where you can't be sure that coded characters
are going to be handled correctly, it could make a lot of sense to
convert an HTML document into &#nnn; represeentation, thus needing
only the character set of us-ascii (7 bits, 95 displayable characters)
to represent the entire unicode repertoire. gnu recode can do this,
and, as I recall, there's a CPAN module.
The Subject: header of this is misleading, however: I wouldn't call
this "translating ascii to unicode". us-ascii is a proper subset of
unicode, and so is iso-8859-1, so if you're dealing with either of
those codings, the conversion to &#nnn; form is trivial. But with any
other coding of the original document, you can't do it without an
appropriate character code conversion table, e.g those at the unicode
FTP server (and of course incorporated into gnu recode).
cheers
------------------------------
Date: Tue, 23 May 2000 09:05:19 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: % translating ascii to unicode?
Message-Id: <392AAC3F.52E7B4C4@vpservices.com>
"Alan J. Flavell" wrote:
>
> On Tue, 23 May 2000, Jeff Zucker wrote:
>
> > Unicode has nothing to do with it.
>
> Sorry, I'd have to contradict that:
Folks if Alan Flavell contradicts Jeff Zucker on topics related to
character encoding (and most other topics), please believe Alan :-).
--
Jeff
------------------------------
Date: Tue, 23 May 2000 17:54:36 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: % translating ascii to unicode?
Message-Id: <959100969.5355.0.nnrp-06.c3ad6973@news.demon.co.uk>
>this "translating ascii to unicode". us-ascii is a proper subset of
>unicode, and so is iso-8859-1, so if you're dealing with either of
>those codings, the conversion to &#nnn; form is trivial. But with any
Are you sure about that one (iso-8859-1)
Things go slightly wrong between hex 80 and 9F (strictly speaking 0080 and
009F)
unicode viewing these as control characters
hex C0 to FF in Latin-1 is the same as unicode (well, 00C0 to 00FF).
------------------------------
Date: 23 May 2000 16:35:13 GMT
From: cjw44@flatline.org.uk (Colin Watson)
Subject: Re: A definition of true?
Message-Id: <8gec01$mkk$1@riva.ucam.org>
Orabīg <bchauvet@capgemini.fr> wrote:
>Yes. It's... true !
>:)
>I've made the mistake some time ago, and spend some hours to fix it !
>
>Try this :
>
>#perl
>
>$test = (1==2);
>print "1 equals 2 !\n" if ($test == true);
>print "1 does not equal 2 !\n" if ($test == false);
Well, perhaps if you were using -w, and preferably 'use strict;' too, as
recommended in all the documentation, then you wouldn't have created
this problem for yourself.
--
Colin Watson [cjw44@flatline.org.uk]
"'Spirited, isn't he?' Tynian whispered to Ulath. 'Red-haired
people are like that sometimes,' Ulath replied sagely."
------------------------------
Date: 23 May 2000 17:59:47 +0100
From: nobull@mail.com
Subject: Re: A definition of true?
Message-Id: <u9wvklkxrw.fsf@wcl-l.bham.ac.uk>
Hardy Merrill <hmerrill@my-deja.com> writes:
> In "Programming Perl - 2nd Edition" by Wall, Christiansen, & Schwartz,
> pages 20-21 contain the section labelled "What Is Truth?". Here is one
> small snippet:
>
> "Truth in Perl is always evaluated in a scalar context. (Other
> than that, no type coercion is done.) So here are the rules
> for the various kinds of values that a scalar can hold:
>
> 1. Any string is true except for "" and "0".
> 2. Any number is true except for 0.
> 3. Any reference is true.
> 4. Any undefined value is false."
This explaination is not now quite complete. In the case of a
reference to a thing blessed into an package that uses overload,
further type coercion _does_ occur as documented in "perldoc
overload".
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Tue, 23 May 2000 13:54:49 -0400
From: Brad Baxter <bmb@dataserv.libs.uga.edu>
Subject: Re: A definition of true?
Message-Id: <Pine.GSO.4.21.0005231346310.9692-100000@dataserv.libs.uga.edu>
On Tue, 23 May 2000, Larry Rosler wrote:
> my $TRUE = 1;
> my $FALSE = 0;
>
> (because using all caps for a variable name has a conventional
> connotation of constancy).
>
> Better, because they cannot be changed inadvertantly:
>
> use constant TRUE => 1;
> use constant FALSE => 0;
>
> Or, equivalently but less clearly:
>
> sub TRUE () { 1 };
> sub FALSE () { 0 };
>
> Or, for any of the above, define FALSE as 0, then TRUE as !FALSE. Or
> vice versa.
I think the pitfall here is assuming that some sort of boolean casting
will magically happen. For instance:
1 #!/usr/local/bin/perl -w
2 use strict;
3
4 use constant TRUE => 1;
5 use constant FALSE => 0;
6
7 my $value = 'tree';
8
9 print "value is true\n\n" if $value;
10 print "value eq TRUE\n\n" if $value eq TRUE;
11 print "value == TRUE\n\n" if $value == TRUE;
Output:
value is true
Argument "tree" isn't numeric in eq at ./qt line 11.
It is better IMO to understand the Perl idioms and use them.
--
Brad
------------------------------
Date: 23 May 2000 15:47:27 GMT
From: ansok@alumni.caltech.edu (Gary E. Ansok)
Subject: Re: About "sprint f" ?
Message-Id: <8ge96f$dqj@gap.cco.caltech.edu>
In article <8gd359$bcb$1@news2.kornet.net>, Lee <lee@factory.co.kr> wrote:
>Hi,
>I have two questions about sprint f.
>
>$padding_value = $basevalue . ( ' ' x (30-length($basevalue)) );
>With above.
>
>1. It seems only count characters not white spaces.
>If it is, how can I solve this to count spaces ?
length() should be counting all characters, including spaces. If it
isn't, then double-check that the variable really contains what you
think it does, and if it's still a problem, post back here including
what the data is. When I do length(' a b c '), I get 7.
If you want to count only spaces, then you probably want one of
$num_space = ($basevalue =~ tr/ //); # count only space characters
$num_white = ($basevalue =~ tr/ \t\n//); # count space, tab, newline
>2. If the $basevalue is longer than 30 characters,
>How can I cut off the letters at 30 ?
You can use substr(), or it sounds like this will work to do both
padding and truncating in one call:
$value_with_pad = sprintf("%-30.30s", $basevalue);
--
Gary Ansok
------------------------------
Date: Tue, 23 May 2000 10:06:14 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: activestate Perl5.6 /w win2000?
Message-Id: <Pine.GSO.4.10.10005231005340.23375-100000@user2.teleport.com>
On 23 May 2000, it was written:
> While installing in Windows 2000, I got the error for "Premature
> Ended" without any further info for failure reason.
What was the full text of the error message? That one isn't even
grammatically correct!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 23 May 2000 09:47:42 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: apache document_root and virtualHost
Message-Id: <Pine.GSO.4.10.10005230946390.23375-100000@user2.teleport.com>
On Mon, 22 May 2000, Alejandro Eluchans wrote:
> Using PERL and a web form. The server is Linix/apache/mod_perl
>
> I'm trying to get a virtual Host's DOCUMENT_ROOT from a cgi activated by
> a form belonging to another host. All this in the same server.
Huh? But it sounds like you're trying to get your webserver to do
something; perhaps you want to search for the docs, FAQs, and newsgroups
about your webserver. Or maybe it's a CGI problem, and reading the
newsgroup comp.infosystems.www.authoring.cgi would help.
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 23 May 2000 09:17:03 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Ask Expert about Perl5 DBM files
Message-Id: <Pine.GSO.4.10.10005230915560.23375-100000@user2.teleport.com>
On Tue, 23 May 2000, Qiang Wu wrote:
> Tom Phoenix wrote:
> > Didn't Randal already answer this in c.l.p.modules? Please, read
> > news.announce.newusers to learn about crossposting. Thanks!
> He does. But he suggested me another way instead of solving the problem.
Well, he gave you good advice.
> This is the first time I use this newsgroup. Can I post questions on
> different newsgroup?
That's what crossposting is all about. If you don't use crossposting,
people get cross. :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 23 May 2000 14:04:31 -0400
From: Brad Baxter <bmb@dataserv.libs.uga.edu>
Subject: Re: Autoload order (WAS Re: Haiku)
Message-Id: <Pine.GSO.4.21.0005231357510.9692-100000@dataserv.libs.uga.edu>
On Tue, 23 May 2000, Gwyn Judd wrote:
> nice poem :) thank you. So from running this in the debugger it seems
> that functions are "autoloaded" in reverse order for some weird reason.
> Is that correct? I confess I don't understand the autoload process.
It actually has little to do with autoload. It's simply a bunch of nested
subroutine calls:
1 #!/usr/local/bin/perl -w
2 use strict;
3
4 sub AUTOLOAD{
5 print+($_=((split/::/,$main::AUTOLOAD)[1]))eq'_'?"\n":"$_ "}
6 use subs qw( the quick brown fox );
7
8 fox brown quick the
That's like saying "fox( brown( quick( the() ) ) );"
Each subroutine prints its own name, beginning with "the()".
Output:
the quick brown fox
Not even very imaginative, really. :-)
--
Brad
------------------------------
Date: Tue, 23 May 2000 17:40:50 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Basic scripting question
Message-Id: <392AA682.F1E5BAC5@ife.ee.ethz.ch>
Uri Guttman wrote:
> DC> perl -ne 'print if $. % 3' input_file > output_file
> it wasn't always clear to print every third line or skip it. i saw both
> types in this thread.
The OP was quite clear in his requirements:
> [a] script that, for example, deletes every 3rd line in a file.
And Abigail answered to a different name with the same question:
perl -ni -we 'print if $. %3' filename
- Alex
------------------------------
Date: Tue, 23 May 2000 09:05:02 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Basic scripting question
Message-Id: <392AAC2E.43535A02@stomp.stomp.tokyo>
Uri Guttman wrote:
> it wasn't always clear to print every third
> line or skip it. i saw both types in this thread.
Baloney. Your ego is making a fool of you.
You are posting code which has no input,
no output, no file handles, nothing, and
most importantly, no testing. Quite often
your code is dead wrong.
If you are unwillingly to post code which
people can test and see results, if you
are unwillingly to post code which works
right and, if you are unwillingly to
actually help people with working code
which loads, runs and produces results,
or at least can be setup easily to do so,
you shouldn't be here.
Godzilla!
------------------------------
Date: Tue, 23 May 2000 16:19:09 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Basic scripting question
Message-Id: <x7g0r9ck8z.fsf@home.sysarch.com>
>>>>> "G" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
G> Uri Guttman wrote:
>> it wasn't always clear to print every third
>> line or skip it. i saw both types in this thread.
G> You are posting code which has no input,
G> no output, no file handles, nothing, and
G> most importantly, no testing. Quite often
G> your code is dead wrong.
no file handles? heh.
learn one liners, purlmoron. the code was perfectly fine. it had unless
instead of if which is a minor bug. it needs no input as it gets it from
<> by default. read perlrun. ooops, you can't since you don't have it on
your box. read page 334 and 53-55 of the blue camel and see if you can
read for comprehension. perl is not a web oriented language however
much your twisted little brain wants it to be.
G> If you are unwillingly to post code which
G> people can test and see results, if you
G> are unwillingly to post code which works
G> right and, if you are unwillingly to
G> actually help people with working code
G> which loads, runs and produces results,
G> or at least can be setup easily to do so,
G> you shouldn't be here.
everyone but you could have run that one liner. so i will take your
comments under advisement. NOT!
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: Tue, 23 May 2000 12:19:29 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Basic scripting question
Message-Id: <brian-ya02408000R2305001219290001@news.panix.com>
In article <392AAC2E.43535A02@stomp.stomp.tokyo>, "Godzilla!" <godzilla@stomp.stomp.tokyo> posted:
> If you are unwillingly to post code which
> people can test and see results, if you
> are unwillingly to post code which works
> right and, if you are unwillingly to
> actually help people with working code
> which loads, runs and produces results,
> or at least can be setup easily to do so,
> you shouldn't be here.
that's right. now take your own advice and leave.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: Tue, 23 May 2000 16:44:52 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Basic scripting question
Message-Id: <8gecl4$321$2@news.mch.sbs.de>
In article <392AAC2E.43535A02@stomp.stomp.tokyo>, "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
[snip]
>If you are unwillingly to post code which
>people can test and see results, if you
>are unwillingly to post code which works
>right and, if you are unwillingly to
>actually help people with working code
>which loads, runs and produces results,
>or at least can be setup easily to do so,
>you shouldn't be here.
>
>Godzilla!
Dear Godzilla,
What O.S. are you using ?
Here is what you should try on any Unix or Linux terminal :
$ cat numbers.txt
1
2
3
4
5
6
7
8
9
10
$ perl -ne print if $. % 3 numbers.txt
1
2
4
5
7
8
10
$
And here is what you should try in a Windows DOS box :
F:\Perl>type numbers.txt
1
2
3
4
5
6
7
8
9
10
F:\Perl>perl -ne "print if $. % 3" numbers.txt
1
2
4
5
7
8
10
F:\Perl>
Michel.
------------------------------
Date: Tue, 23 May 2000 09:47:45 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Basic scripting question
Message-Id: <392AB631.BE141246@stomp.stomp.tokyo>
Bart Lateur wrote:
> The "next" is superfluous, since it's the last thing
> you do in the loop.
Your points are valid. However it is my customary
habit to write example code in Plain English which
'states' what is happening to enhance understanding.
This, as you know, leads to verbose code, yet code
which well exemplifies step-by-step events. Much of
our modern code, although efficient and effective,
when written, resembles Egyptian hierogyphlics and
does not lend well to reading comprehension. I worry
a reader might not understand or misconstrue what
is posted.
Perhaps I could be faulted for making an assumption
people will modify my code to be shorter and more
eloquent. Sometimes I remember to add a comment of
this nature and, sometimes I forget. I shall work
on remembering to comment my code is verbose and
could be eloquently shortened once understanding
of mechanics is had without any doubts.
Teachers, especially English teachers, are pedantic
to a point of significant annoyance. Math teachers
are even worse though. Physical education teachers
are the absolute worst however. They make you do
the same exercises over and over until you scream.
On strict and warnings, yes, for me they are but
an annoyance. However, as I have said before, this
is not to discount their value but rather to point
to how they sometimes mislead or fail. My preference,
needing reliability, is to code in my own warnings
and error bail outs during testing. I trust my code
and trust my errors. I do not trust pragma hints.
Someone else wrote those, someone I don't know and
don't know of his or her skill and intent.
This code I posted for this thread is actually to
show how safety devices can be written into code
with no need for pragma hints and the such. These
methods I used, are very reliable. Little room is
left for errors. My code also demonstrates how
a program will run perfectly although pragma hints
scream, "You cannot do that!"
I am somewhat surprised nobody critiqued me for
this totally schizoid method of checking for a
file actually being opened and read:
if (@Test)
{ print "Old File Open. Array Created.\n\n"; }
Why this is schizoid, perhaps you will figure out.
However, there is a redundant check about ten or
twelve lines later.
Godzilla!
------------------------------
Date: Tue, 23 May 2000 16:58:38 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Basic scripting question
Message-Id: <x73dn9cif8.fsf@home.sysarch.com>
>>>>> "G" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
G> Bart Lateur wrote:
>> The "next" is superfluous, since it's the last thing
>> you do in the loop.
G> Your points are valid. However it is my customary
G> habit to write example code in Plain English which
G> 'states' what is happening to enhance understanding.
G> This, as you know, leads to verbose code, yet code
G> which well exemplifies step-by-step events. Much of
G> our modern code, although efficient and effective,
G> when written, resembles Egyptian hierogyphlics and
G> does not lend well to reading comprehension. I worry
G> a reader might not understand or misconstrue what
G> is posted.
heh. then why no next in the if clause? and why the extra (broken) test
for $line_count == 3? and why no next at the end of the loop. might as
well tell the code to do the next loop explicitly instead of letting }
handle it. many more place you could be more english like but you don't.
typical.
G> I am somewhat surprised nobody critiqued me for
G> this totally schizoid method of checking for a
G> file actually being opened and read:
G> if (@Test)
G> { print "Old File Open. Array Created.\n\n"; }
G> Why this is schizoid, perhaps you will figure out.
G> However, there is a redundant check about ten or
G> twelve lines later.
because you post so much bad code it takes dozens of us to catch every
fault. i missed the = for == bug but i caught that the test was
superfluous anyway.
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: Tue, 23 May 2000 18:01:14 +0100
From: Chris Allen <chris@cjx.com>
Subject: Re: Basic scripting question
Message-Id: <A94F8E6B0C7C3849.C3145F9A3AEAAD8B.1DBF0CCCE5FFEACD@lp.airnews.net>
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
>Baloney. Your ego is making a fool of you.
>
>
>You are posting code which has no input,
>no output, no file handles, nothing, and
>most importantly, no testing.
>
You are not for real... You can't be for real!
Anyone smart enough to put a perl script together in the
first place would have examined the one-liner posted
and agreed it was an elegant solution to the problem.
I can only assume that you actually know *exactly* what
you are doing and are posting purely to wind up the members
of clpm.
* You find a scroll labelled THARR
------------------------------
Date: Tue, 23 May 2000 17:04:05 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: Basic scripting question
Message-Id: <9SyW4.5180$QB4.399898@news.uswest.net>
"Godzilla!" <godzilla@stomp.stomp.tokyo> elucidates:
> Bart Lateur wrote:
>
>> The "next" is superfluous, since it's the last thing
>> you do in the loop.
>
> Your points are valid. However it is my customary
> habit to write example code in Plain English which
> 'states' what is happening to enhance understanding.
If you wrote your example code in Perl, it would have
fewer problems, and so would you.
> This, as you know, leads to verbose code, yet code
> which well exemplifies step-by-step events. Much of
This, as we well know, leads to code that is broken,
doesnt' work, and is insecure.
> our modern code, although efficient and effective,
> when written, resembles Egyptian hierogyphlics and
> does not lend well to reading comprehension.
It leads to reading comprehention for ignorant trolls.
For those that know Perl, it is quite plain.
> I worry
> a reader might not understand or misconstrue what
> is posted.
Ah, irony...
------------------------------
Date: Tue, 23 May 2000 10:12:00 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Basic scripting question
Message-Id: <392ABBE0.28666E68@stomp.stomp.tokyo>
Uri Guttman wrote:
> learn one liners, purlmoron. the code was perfectly fine.
> it had unless instead of if which is a minor bug.
Ego is Man's worst Nemesis.
- Kira
* laughs *
Godzilla!
------------------------------
Date: Tue, 23 May 2000 10:16:08 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Basic scripting question
Message-Id: <392ABCD8.2FBF0966@stomp.stomp.tokyo>
Chris Allen wrote:
> Anyone smart enough to put a perl script together in the
> first place would have examined the one-liner posted
> and agreed it was an elegant solution to the problem.
Except for one thing; it doesn't work right.
Godzilla!
------------------------------
Date: Tue, 23 May 2000 10:20:51 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Basic scripting question
Message-Id: <392ABDF3.EF177510@stomp.stomp.tokyo>
Chris Allen wrote:
> I can only assume that you actually know *exactly* what
> you are doing and are posting purely to wind up the members
> of clpm.
Do you see me twisting arms, holding a gun
to a person's head, forcing people to post
insulting vulgar sociopathic flame articles?
You make this choice. You are to blame.
Godzilla!
------------------------------
Date: Tue, 23 May 2000 09:28:44 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Building a hash array
Message-Id: <Pine.GSO.4.10.10005230927490.23375-100000@user2.teleport.com>
On Mon, 22 May 2000, Larry Rosler wrote:
> But /j*/ produces the same split as //, doesn't it?
No; but of course I wanted /j+/ here.
> We all have bad days, I guess. :-)
Too true. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 23 May 2000 09:38:22 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: calling sequence of perl scripts
Message-Id: <Pine.GSO.4.10.10005230936570.23375-100000@user2.teleport.com>
On Tue, 23 May 2000, Marc Lambrichs wrote:
> I'm calling a perl script in taint mode from a java servlet. This perl
> script uses the Expect module for doing a "su root"
It would be easier, I'd expect, to make the Perl program run set-id to
root. If that's properly done, it should be more secure than storing the
root password into the script (as, I suspect, you're doing).
Be sure to read the perlsec manpage. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
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 3134
**************************************