[9734] in Perl-Users-Digest
Perl-Users Digest, Issue: 3328 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 3 14:05:31 1998
Date: Mon, 3 Aug 98 11:02:04 -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 Mon, 3 Aug 1998 Volume: 8 Number: 3328
Today's topics:
Re: Copyright question <jdporter@min.net>
Re: Copyright question (Gary L. Burnore)
Re: file modification <quednauf@nortel.co.uk>
getting the right modules for windows95? <dtbaker_@flash.net>
Re: Glob problem (Tye McQueen)
Re: Good Book? <tchrist@mox.perl.com>
Re: hiding user input <dgris@rand.dimensional.com>
Re: hiding user input (Gary L. Burnore)
Re: hiding user input (Patrick Timmins)
Re: hiding user input <jdporter@min.net>
Re: hiding user input <jdporter@min.net>
Re: hiding user input (Chris Nandor)
Re: hiding user input (Steve Linberg)
Re: hiding user input (Michael J Gebis)
Re: hiding user input (Gary L. Burnore)
Re: hiding user input (Gary L. Burnore)
Re: hiding user input (Gary L. Burnore)
Re: Inheritance broken when objects share a file? (Tye McQueen)
Re: Inheritance broken when objects share a file? (M.J.T. Guy)
Re: Interesting Question needs Quick Answer (Mike Stok)
Re: op/rand test problem on SunOS 5.5.1 (M.J.T. Guy)
Re: perl error message (Peter Seebach)
Re: Problem opening pipe on SunOS 4.1.4 (M.J.T. Guy)
Re: Programmer's Editor (Andrew M. Langmead)
Re: regex question (Larry Rosler)
Re: regex question (Larry Rosler)
Re: regex question <rick.delaney@shaw.wave.ca>
Re: Sendmail in Perl never ends <mc@whoever.com>
syscall.ph + 5.005: "architecture not supported by Linu <emarsden@mail.dotcom.fr>
Re: Trying to run a SCO app under RedHat 5.0 (Gary L. Burnore)
Re: Using pointers (Craig Berry)
Re: WANTED: Perl Autoreponder - Any Takers? <gdonohoe@nmp.nokia.com>
Re: What's the difference? <rick.delaney@shaw.wave.ca>
Re: What's the difference? <quednauf@nortel.co.uk>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 03 Aug 1998 16:10:34 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Copyright question
Message-Id: <35C5E182.44@min.net>
Andy Johnson wrote:
>
> Tyler Andersen wrote:
> > I would check with someone who knows the law. I've read cases where even
> > though the individual wrote the code, the company he works for owns the
> > copyright. I'm not sure if this is true/right, but you should still check
> > into it. Better be safe then sorry.
>
> This cannot be true, because thousands of programs are copyrighted under the
> GNU GPL, ....
This can indeed be true. Many (most? all?) companies have their
employees sign contracts by which the employee assigns to the company
the right to any intellectual material the employee produces while
on the payroll of the company (even when not "on the clock"), as
long as the intellectual material might be of value to the company.
(A good test is whether the material might be of value to a
competitor, and thus put the employee in a potential state of
conflict of interest. To prevent this, the company simply assumes
the right to all such intellectual material/product.)
Now this does not mean that no GPL'ed code could possibly be
produced. I can envision many scenarios which allow GPL'ed code
to arise.
--
John Porter
------------------------------
Date: Mon, 03 Aug 1998 16:27:18 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Copyright question
Message-Id: <35c5e45d.85372687@nntpd.databasix.com>
On Mon, 03 Aug 1998 16:10:34 GMT, in article <35C5E182.44@min.net>, John
Porter <jdporter@min.net> wrote:
>Andy Johnson wrote:
>>
>> Tyler Andersen wrote:
>> > I would check with someone who knows the law. I've read cases where even
>> > though the individual wrote the code, the company he works for owns the
>> > copyright. I'm not sure if this is true/right, but you should still check
>> > into it. Better be safe then sorry.
>>
>> This cannot be true, because thousands of programs are copyrighted under the
>> GNU GPL, ....
>
>This can indeed be true. Many (most? all?) companies have their
>employees sign contracts by which the employee assigns to the company
>the right to any intellectual material the employee produces while
>on the payroll of the company (even when not "on the clock"), as
>long as the intellectual material might be of value to the company.
>(A good test is whether the material might be of value to a
>competitor, and thus put the employee in a potential state of
>conflict of interest. To prevent this, the company simply assumes
>the right to all such intellectual material/product.)
>
>Now this does not mean that no GPL'ed code could possibly be
>produced. I can envision many scenarios which allow GPL'ed code
>to arise.
Sometimes even without such an agrreement being signed, the company still has
copyright.
A good reference on the subject is: Legal Care for your Software by Daniel
Remer which is a Nolo Press publication.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: Mon, 03 Aug 1998 17:51:40 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: file modification
Message-Id: <35C5EA9C.C43661E@nortel.co.uk>
wilgro@my-dejanews.com wrote:
>
> Hello,
>
> I am looking for a program that will take a text file and add a line to it
> at the beginning without needing to pull the whole file in, modify it and
> then save it again.
What about this?
$tofill = "Hello, I am the first line\n";
open FILE, "+< /u/quednauf/temp/testfile.txt" or die "AAAARGH!";
do {
read FILE, $grab, 1;
if ($grab) {
$tofill .= $grab;
seek FILE, -1, 1;
seek FILE, 0, 1; #needed on some systems
print FILE substr ($tofill, 0, 1);
seek FILE, 0, 1; #needed on some systems
$tofill =~ s/^.//s;
} else {
print FILE $tofill; $tofill = '';
}
} until (!length($tofill));
close FILE;
I experienced problems when I didn't use the seek File, 0, 1; I
experienced all sorts of problems, really. But that version seems to
work and is quite memory friendly, as $tofill is the only busy variable
which will have the length of your original insertion string most of the
time...
Either way, please also RTFineM, as I cannot be trusted :)
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 03 Aug 1998 12:54:02 -0500
From: Dan Baker <dtbaker_@flash.net>
Subject: getting the right modules for windows95?
Message-Id: <35C5F93A.44FF@flash.net>
Although my questions are about CGI libraries in particular... please
don't unload on me. I'm having trouble understanding where to get Perl
modules for win32 (windows95) ;)
I just started poking around with forms and cgi... and need to gather
the basic tools required to read and decode the form data. The books
I've been reading reference modules CGI::*, LWP::*, and several others.
I would like to know which set of modules is the de facto standard,
easiest to use, etc.
I spent some time at the CPAN site looking for the libraries to
download, and *think* that what I need is probably the libwww package?
Am I correct? I hesitate to download and attempt to install before
getting a sanity check on this. It looks like the latest version is
libwww-perl-5.35.tar.gz, is this a solid release?
I also looked at the readmes for a couple other modules like
Text::Template and it doesn't look like they are for win32 either. Are
all modules ported for win32 and stored somewhere different?
To make matters a little more confusing for me, it appears that the
libwww page is not intended for win32 platforms... the
libwww-perl-5.35.tar.gz readme talks about make and compiling, which I
am not set up to do on my PC. Is there another version of the library
that is "ready-to-go" for PCs?
As an alternative, I did run across some perl code to decode data POSTed
from HTML... would I be missing much functionality from the CGI module
if I just hand-roll the code using this routine?:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$FORM{$name} = $value;
}
Thanx, Dan
# If you would like to reply-to directly, remove the _ from my username
* Use of my email address regulated by US Code Title 47,
Sec.227(a)(2)(B) *
------------------------------
Date: 3 Aug 1998 11:48:46 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: Glob problem
Message-Id: <6q4ple$3ag@fumnix.metronet.com>
dan@NOSTINKINSPAM.nwsl.west.ga.net. (Daniel) writes:
) open(MYNEWFIL,"/dbase.txt");
) while(<MYNEWFIL>)
) {
) $inline = $_
) ($name,$value) = split(/=/,$inline);
) local (*GLOB) = $name;
) $GLOB = $value;
) etc...
)
) This worked great in perl4. Perl 5 tells me
)
) Modification of a read-only value attempted at ./cardsearchold.pl line 1277,
) <MYNEWFIL> chunk 19.
)
) The line is "$GLOB = $value;" above
We need to see what $name gets set to. The following example may
be helpful for understanding why:
% perl
$name= "]";
local (*GLOB) = $name;
print "GLOB=$GLOB\n";
$GLOB = "value";
^D
GLOB=5.00404
Modification of a read-only value attempted at - line 4.
$GLOB becomes an alias for $] which shows the current version of
perl being used and which cannot be modified because it is read-only.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: 3 Aug 1998 13:29:11 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Good Book?
Message-Id: <6q4dv7$hv9$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, jdporter@min.net writes:
:This still doesn't help me know if a book I already own
:is worth using. Am I to infer that if it isn't a 4/5 camel
:book in Camel Critiques, it is not a good book? What,
:all the 4/5 camel books have already been reviewed, and
:all else is chaff?
Perhaps you might rephrase your followup in a less
confrontational and antogonistic style, lest it be
inadvertently placed in the destructive pile rather
than the constructive one, since I'm nearly certain
you're really just trying to help.
--tom
--
A woman needs a little more weird today than normal. --Andrew Hume
------------------------------
Date: Mon, 03 Aug 1998 16:16:00 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: hiding user input
Message-Id: <6q4n0q$9l0$1@rand.dimensional.com>
In article <35c6c6df.77821311@nntpd.databasix.com>
gburnore@databasix.com wrote-
>If any of his admins (And management> have a clue, they'll see that his
>continued emailing after being warned to stop is harassment.
And yet your repeated 500k messages to me are not harassment (I'm
not kidding folks, this asshole has flooded my box with several
500k posts, <sigh> I thought we were all above petty denial of
service tactics), go figure.
>--
> I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
Then don't troll usenet. Seems like a mighty simple solution
to me, but I'll restate for the mentally non-functional:
IF YOU WANT TO TROLL, GO THE FUCK ELSEWHERE! (everyone else,
sorry for shouting).
And for one who complains constantly about netiquette, you sure
do a good job violating nearly every custom of usenet, including
maximum signature length. *Sheesh*!
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
Dave Clark
------------------------------
Date: Mon, 03 Aug 1998 16:56:39 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35c5eaad.86989000@nntpd.databasix.com>
On Mon, 03 Aug 1998 16:16:00 GMT, in article
<6q4n0q$9l0$1@rand.dimensional.com>, Daniel Grisinger
<dgris@rand.dimensional.com> wrote:
>In article <35c6c6df.77821311@nntpd.databasix.com>
>gburnore@databasix.com wrote-
>
>>If any of his admins (And management> have a clue, they'll see that his
>>continued emailing after being warned to stop is harassment.
>
>And yet your repeated 500k messages to me are not harassment
Nope. Had you not continued to email after being asked/warned/told to stop,
there'd be no reply.
>(I'm
>not kidding folks, this asshole has flooded my box with several
>500k posts,
435 K requests to stop emailing me since lessers didn't get your attention.
3 is not flooded. One for every two of your emails. Stretching the truth to
fit your needs?
><sigh> I thought we were all above petty denial of
>service tactics), go figure.
>
>>--
>> I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
>
>Then don't troll usenet.
Your opinion is that it's a troll. Your opinion means jack shit.
>Seems like a mighty simple solution
>to me, but I'll restate for the mentally non-functional:
>IF YOU WANT TO TROLL, GO THE FUCK ELSEWHERE! (everyone else,
>sorry for shouting).
I'm not trolling.
Of all of the USENet groups I've posted to/read in all of my time in USENet
I've never been emailed more for shit that belongs in USENet than here. It's
BULLSHIT to email someone when you know they're reading it in USENet. It's
BULLSHIT to continue to email them after they ask you and tell you to stop.
I suggest if you don't like 435k requests to stop emailing me, STOP EMAILING
ME.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: Mon, 03 Aug 1998 17:01:23 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: hiding user input
Message-Id: <6q4qd3$f5v$1@nnrp1.dejanews.com>
In article <35C4ACE3.48686576@m.block>,
sp@m.block wrote:
> Gary L. Burnore wrote:
> >
> > On Sun, 02 Aug 1998 20:34:06 +0900, in article <35C44EAF.FCF6FD2C@m.block>,
> > Spam Block <sp@m.block> wrote:
> > >Suggestion: we need a FAQ which explains why it is abusive to respond to a
> > >postingt in terms like "Are you thicker than shit or can't you just read?".
> >
> > That would be good. Unfortunately, new users won't know to use it to their
> > defense.
>
> Actually I intended this to be read by the "abusive experts" seeing as how
> they can't seem to get to grips with the basics of human communication and
> seem to base evrything on the reading or non of FAQs.
[snip]
> Or even just not read any posting which is from somebody you don't know,
> getting round the thorny prob of coming into contact with the plebs groping
> their way through the trivialities of learning the basics, leaving
> intellectual space free to consoder perl guru advanced pursuits like how to
> casually mention Larry by his first name in your postings so it seems you drop
> round his house for a coffee after a hard days slaving over your hand coded
> unix OS or what's the flashiest way to make a simple function unreadable so
> you can stick it on your postings as a signature
I have a lovely bunch of coconuts.
I see the writing on the wall.
I hear the locust in the summer-time.
I smell the mushrooms in the fall.
Springtime brings rain and wind and thunder.
Summer days brings roses red and white.
God in his Heaven sees us under,
Scrapping and itching for a fight.
Grab your kids and tell them that you love them.
Hug your wife and kiss her tenderly.
Laugh at life and love the time we have here,
and soon enough you're happy as can be.
None of this has anything to do with Perl either. But you can still believe
it. I do, anyway. Blah blah newbies blah blah blah gurus blah blah blah FAQ
blah blah e-mail blah blah blah abusive blah blah usenet blah blah blah unix
blah blah RTFM blah blah blah idiot blah blah blah mean blah blah cruel blah
blah [snif snif] blah blah crap blah blah blah I blah blah me blah blah you
blah blah my blah blah blah mine blah blah your blah blah blah blah blah blah
blah.
Patrick Timmins
U. Nebraska Medical Center
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 03 Aug 1998 17:38:53 GMT
From: John Porter <jdporter@min.net>
Subject: Re: hiding user input
Message-Id: <35C5F635.4CFF@min.net>
Gary L. Burnore wrote:
>
> Accounts would be toast faster if it were SPAM.
> It's not SPAM so you can't call it that.
Unsolicited, unwanted email is usually called spam, no?
> I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
Actually, there's a very effective way to make sure none of the
"experts" in this group reply by email to your usenet postings:
munge your reply-to address!
--
John Porter
------------------------------
Date: Mon, 03 Aug 1998 17:40:55 GMT
From: John Porter <jdporter@min.net>
Subject: Re: hiding user input
Message-Id: <35C5F6AE.EA5@min.net>
Gary L. Burnore wrote:
>
> Your opinion means jack shit.
Um, *everyone's* opinion means jack shit, on usenet.
Yours included.
--
John Porter
------------------------------
Date: Mon, 03 Aug 1998 13:42:59 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: hiding user input
Message-Id: <pudge-0308981342590001@192.168.0.3>
In article <35c5eaad.86989000@nntpd.databasix.com>,
whatpartofdontemailme@dontyouunderstand wrote:
# Your opinion is that it's a troll. Your opinion means jack shit.
If you do not care about his opinion that you are trolling, why should he
(or I, or anyone) care about your opinion that e-mails to Usenet posts are
not appropriate?
Whoops, I cc:d you again ... darnit. I keep forgetting.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Mon, 03 Aug 1998 13:45:57 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: hiding user input
Message-Id: <linberg-0308981345580001@projdirc.literacy.upenn.edu>
In article <35c20fb6.57357791@nntpd.databasix.com>, gburnore@databasix.com
wrote:
> And a quick check to this
> one group will show everyone that you're a bitch.
("you" being Abigail)
A quick check to this group will show everyone that Abigail's knowledge of
programming and Perl exceeds that of 99% of the other posters here
COMBINED. That's all I'm interested in.
Meanwhile, if people would just read the @#&^!@ FAQ's - not just once, but
regularly - we would all live longer.
See you (maybe) in clp.moderated.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 3 Aug 1998 17:42:15 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: hiding user input
Message-Id: <6q4spn$3te@mozo.cc.purdue.edu>
Scratchie <upsetter@ziplink.net> writes:
}Greg Bacon <gbacon@cs.uah.edu> wrote:
}: In article <6q0dgc$2be@mozo.cc.purdue.edu>,
}: gebis@noble.ecn.purdue.edu (Michael J Gebis) writes:
}: : gbacon@cs.uah.edu (Greg Bacon) writes:
}: : }Please tell us that you've stopped beating your poor wife.
}: :
}: : Dammit not this again.
}: There was a time when I had mistaken you for someone of clue.
}And if he's gotten sick of your childishness, that means he's clueless?
}You severely overestimate your importance, Greg.
My site hasn't gotten Greg's response, but:
Greg wanted to make a point which would be something like, "Your
question makes an assumption which is incorrect, and therefore cannot
be answered properly."
However, he used the "classic" wife-beating question which not only turns
his point into a personal attack, but also contains a reference to domestic
violence, both of which virtually guarantee angry responses on USENET.
Worst of all, we keep seeing this question on this group, in spite of
the fact that it always fails to make its point, in spite of the fact
that it causes much more off-topic traffic than it averts, and in
spite of the fact that it stopped being even moderately clever the
first dozen times we saw it.
Then, when I call him on this, he follows it up with an attack
questioning my buddha-nature.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Mon, 03 Aug 1998 17:52:00 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35caf7f7.90390710@nntpd.databasix.com>
On Mon, 03 Aug 1998 17:38:53 GMT, in article <35C5F635.4CFF@min.net>, John
Porter <jdporter@min.net> wrote:
>Gary L. Burnore wrote:
>>
>> Accounts would be toast faster if it were SPAM.
>> It's not SPAM so you can't call it that.
>
>Unsolicited, unwanted email is usually called spam, no?
Unsolicited Commercial email (UCE) is sometimes referred to as SPAM. UBE
(Unsolicited Bulk Email is also sometimes called SPAM. Emailing someone after
they ask/tell you to stop is harassment.
>
>
>> I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
>
>Actually, there's a very effective way to make sure none of the
>"experts" in this group reply by email to your usenet postings:
>munge your reply-to address!
Uh, I did: Reply-To: whatpartofdontemailme@dontyouunderstand
so they just use the From: line. I won't forge that for them. But I am going
t set up a nice little procmail filter that works specifically for this group
since it's in this group that the "experts" seem to think it's ok to post and
followup and those same said experts can't take leave my email alone for an
answer.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: Mon, 03 Aug 1998 17:52:28 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35cbf8c7.90599637@nntpd.databasix.com>
On Mon, 03 Aug 1998 17:40:55 GMT, in article <35C5F6AE.EA5@min.net>, John
Porter <jdporter@min.net> wrote:
>Gary L. Burnore wrote:
>>
>> Your opinion means jack shit.
>
>Um, *everyone's* opinion means jack shit, on usenet.
>Yours included.
Yes John, I know. Everyone's but Jack Shit's and his means squat.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: Mon, 03 Aug 1998 17:53:42 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35ccf8e9.90632679@nntpd.databasix.com>
On Mon, 03 Aug 1998 13:42:59 -0400, in article
<pudge-0308981342590001@192.168.0.3>, pudge@pobox.com (Chris Nandor) wrote:
>In article <35c5eaad.86989000@nntpd.databasix.com>,
>whatpartofdontemailme@dontyouunderstand wrote:
>
># Your opinion is that it's a troll. Your opinion means jack shit.
>
>If you do not care about his opinion that you are trolling, why should he
>(or I, or anyone) care about your opinion that e-mails to Usenet posts are
>not appropriate?
>
>Whoops, I cc:d you again ... darnit.
That's ok. Your domain and that of those you email from have been added to
hosts.deny. Won't see your shit. It'll go right back where it came from.
> I keep forgetting.
You keep harassing in private email. Typical asshole that you are.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: 3 Aug 1998 11:56:21 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: Inheritance broken when objects share a file?
Message-Id: <6q4q3l$51d@fumnix.metronet.com>
) > If you put @ISA in a BEGIN { } block, things will work as you expect.
kpreid@ibm.net (Kevin Reid) writes:
)
) For a neater solution, try this:
)
) "ISA.pm":
)
) package ISA;
)
) sub import {
) shift;
) print "\@_ = @_, caller = @{[scalar caller]}\n";
) @{caller() . '::ISA'} = @_;
) }
)
) 1;
Or just
use base SomeClass;
which is included in the standard distrubition but not documented yet.
It is equivalent to:
use SomeClass;
push( @ISA, qw(SomeClass) );
except it all happens at compile time.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: 3 Aug 1998 17:21:28 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Inheritance broken when objects share a file?
Message-Id: <6q4rio$s79$1@pegasus.csx.cam.ac.uk>
Tye McQueen <tye@fumnix.metronet.com> wrote:
>Or just
>
> use base SomeClass;
>
>which is included in the standard distrubition but not documented yet.
Eh? Seems to be documented to me (in perl5.004_04 and perl5.005):
% perldoc base
base(3) User Contributed Perl Documentation base(3)
NAME
base - Establish IS-A relationship with base class at
compile time
SYNOPSIS
package Baz;
use base qw(Foo Bar);
[ etc ]
Mike Guy
------------------------------
Date: 3 Aug 1998 17:57:41 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Interesting Question needs Quick Answer
Message-Id: <6q4tml$aru@news-central.tiac.net>
In article <6pviom$d7u$1@monet.op.net>, Mark-Jason Dominus <mjd@op.net> wrote:
>In article <6pt8ob$ish@news-central.tiac.net>,
>Mike Stok <mike@stok.co.uk> wrote:
>>26 lines?
>>
>>#!/usr/local/bin/perl -w
>>use strict;
>>seek DATA, 0, 0;
>>print while <DATA>;
>>__END__
>
>The original problem specification prohibited `system call's, and I
>suspect that this was expressly to prevent solutions liked yours that
>explictly read the program's source file.
Well I don't remember the original message (and am too lazy to go look at
dejanews right now) but surely most methods of generating output from a
program use some kind of system call, so I don't see what's wrong with
using perl's provided DATA handle (or if that's not allowed than are we
also bound to not use the provided STDOUT handle too?)
This program would be a fun part of a perl compiler test suite ;-)
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 3 Aug 1998 17:15:16 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: op/rand test problem on SunOS 5.5.1
Message-Id: <6q4r74$s3i$1@pegasus.csx.cam.ac.uk>
In article <6q4cvn$i3c$1@news.mel.aone.net.au>,
Scott A Baxter <sbaxter@c031.aone.net.au> wrote:
>I am trying to install perl 5.003 on SunOS 5.5.1 and I find that when I run
>the make test op/rand fails on test2.
>
>When I ran Configure the script said that the number of bits returned by my
>rand function was 31. I accepted the default and I suspect that this may be
>the problem. I am not sure what value I should use.
randbits should be set to 15 on Solaris 2. You should be able to get
away with changing the entry in config.sh and then running ./Configure -S.
Then make test etc.
Dunno why Configure is getting it wrong, but since it's such an ancient
Perl, I doubt anyone is interested in finding out.
Why aren't you installing an up-to-date Perl? Many, many bugs have
been mended since Perl 5.003, including significant security problems.
Mike Guy
------------------------------
Date: Mon, 03 Aug 1998 16:01:19 GMT
From: seebs@plethora.net (Peter Seebach)
Subject: Re: perl error message
Message-Id: <j9lx1.138$H11.540024@ptah.visi.com>
In article <6pt9jc$f04$1@nnrp1.dejanews.com>, <soobak@my-dejanews.com> wrote:
>Hi. I'm trying to run a perl script and have come up with the following error
>message:
>Literal @cornell now requires backslash at submit.pl line 21, within string
>Execution of submit.pl aborted due to compilation errors.
What it means is that when you have '@cornell' occur in a literal, it now
requires a backslash.
Which of the words doesn't mean the same thing to you that it does to me?
Put a backslash in front of the @ in the literal, and all will be well.
-s
--
Copyright '98, All rights reserved. Peter Seebach / seebs@plethora.net
C/Unix wizard, Pro-commerce radical, Spam fighter. Boycott Spamazon!
Not speaking for my employer. Questions on C/Unix? Send mail for help.
Visit my new ISP <URL:http://www.plethora.net/> --- More Net, Less Spam!
------------------------------
Date: 3 Aug 1998 16:48:02 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Problem opening pipe on SunOS 4.1.4
Message-Id: <6q4pk2$rk6$1@pegasus.csx.cam.ac.uk>
Michael McLinn <mmclinn@draper.com> wrote:
>Hello, I'm trying to get a script to run in a multiplatform environment that
>needs to open a fifo and write to it. This works just fine on Solaris & DEC
>OSF, but the script fails on SunOS 4.1.4. I was able to generate some
>simplified code that generates the problem on sunos but not other systems.
>The simplified code is as follows:
>
>#!/usr/local/bin/perl
>
>unless ( -p "login_pipe" ) {
> unlink "login_pipe";
> system("mknod", "login_pipe", "p")
> && die "Can't mknod pipe: $!\n";
>}
>print "Running\n";
>open PIPE, "> login_pipe" or die "Couldn't open: $!\n";
>print PIPE "test\n";
>close PIPE;
>
>On Solaris & OSF this script works as expected, it blocks until something
>reads from the pipe, then it writes "test" to the pipe and exits.
>
>On SunOS 4.1.4, this gives the error "File exists.", it does the same if I try
>to append to the file instead.
I don't have SunOS 4.1.4 to try, but this works for me on SunOS 4.1.3.
Mike Guy
------------------------------
Date: Fri, 31 Jul 1998 13:29:30 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Programmer's Editor
Message-Id: <Ewyo56.6IB@world.std.com>
Alan Silver <alan@find-it.furryferret.uk.com> writes:
>Despite my love for UNIX (especially compared with the pathetically
>inferior Microsoft alternative), it is *not* the case that perl=UNIX.
No perl isn't Unix, but in the book Programming Perl, Larry Wall
described it with phrases like "Perl is the portable distillation of
Unix culture."
Not only are so many of the language constructs designed to mimic the
common unix tools (shell quoting constructs, C like operators, so many
functions being C library functions, unix-like regular expressions,
etc.) but the whole concept of a "glue language" language makes little
sense unless you have unix-like small tools to glue.
Yes, perl has been ported to other environments, I use the Windows and
Macintosh ports all the time, but it looses something when it doesn't
have the rest of the unix environment to interact with.
--
Andrew Langmead
------------------------------
Date: Mon, 3 Aug 1998 08:59:45 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: regex question
Message-Id: <MPG.102f7e48fdb4c309897b6@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <Xqkx1.434$9t2.4290749@news3.voicenet.com> on Mon, 03 Aug 1998
15:11:51 GMT, Matt Knecht <hex@voicenet.com> says...
> Larry Rosler <lr@hpl.hp.com> wrote:
...
> >s/(a){2}/$1b/;
>
> Or, a little more general purpose:
>
> $doubles = 'a|b|c|d';
>
> s/($doubles)\1/$1b/g;
>
> Salt and pepper to taste.
My taste would be *much* more efficient than that:
$doubles = 'acd';
s/([$doubles])\1/$1b/go;
But I was leaving the generalization as an exercise for the reader...
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 3 Aug 1998 09:04:18 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: regex question
Message-Id: <MPG.102f7f5b91ecfae39897b7@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <x4lx1.603$NJ5.4343665@news2.voicenet.com> on Mon, 03 Aug 1998
15:56:13 GMT, Matt Knecht <hex@voicenet.com> says...
> Larry Rosler <lr@hpl.hp.com> wrote:
...
> >> s/([$doubles]){2}/$1b/go;
>
> I forgot the cardinal rule. Use character classes instead of
> alteration whenever possible.
>
> In my own defense, this could be changed to:
>
> $doubles = '(?:word)|(?:another_word)'
>
> >But I was leaving the generalization as an exercise for the reader...
>
> I was the reader. ;-)
Indeed! But I was wrong about the {2} and you are right to use \1. Mine
would match any two characters in the class, yours would match only
doubles, as requested by the original post.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 03 Aug 1998 16:56:39 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: regex question
Message-Id: <35C5ED31.EFC95D96@shaw.wave.ca>
Larry Rosler wrote:
>
>
> Indeed! But I was wrong about the {2} and you are right to use \1.
> Mine would match any two characters in the class, yours would match
> only doubles, as requested by the original post.
>
Actually the original poster asked, " What does the regex have to look
like to match only the 2nd time the 'a' occurs?" So in the spirit of
generalizing the solution:
$var = 'abcdabcdabcd';# characters not necessarily consecutive
$var =~ s/(.)/$count{$1}++ == 1 ? 'b' : $1/gse;
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Mon, 03 Aug 1998 16:58:53 +0100
From: Martin C Brown <mc@whoever.com>
Subject: Re: Sendmail in Perl never ends
Message-Id: <35C5DE3C.9EDAC97C@whoever.com>
Bill Cheers wrote:
> The mail gets sent in the following script but the script seems to hang
> closing sendmail. Any help would be greatly appreciated.
Just worked when I tried it here.
I suspect it's related to sendmail trying to imemdiately send the message
and having trouble communicating the specified MX host for the email
address.
Try using sendmail -v to monitor what sendmail is doing.
You don't mentioned the OS - Solaris keeps sendmail in /usr/lib not
/usr/sbin, YMM.
Incidentally, since you're specifying the full message header and body
information you might want to try using sendmail -t, which forces sendmail
to identify the email contents and extract the to/from fields for the
recipients. Probably doesn't make a huge difference performance wise, but
if you're going to the trouble then it saves a few characters :))
MC
------------------------------
Date: 03 Aug 1998 18:37:41 +0200
From: Eric Marsden <emarsden@mail.dotcom.fr>
Subject: syscall.ph + 5.005: "architecture not supported by Linux C library"
Message-Id: <m2iukarpgq.fsf@cook.onecert.fr>
I have a problem with Perl 5.005 using syscall.ph. (I have installed
the required .ph files with h2ph). When I run the script which uses
`require syscall.ph', I get an error
architecture not supported by Linux C library at /usr/local/lib/perl5/site_perl/5.005/i586-linux/syscall.ph line 26.
BEGIN failed--compilation aborted at ./stressTest.pl line 10.
The same script worked perfectly on the same system with perl 5.004.
The platform is Linux kernel 2.0.34, libc.so.5.3.12. Where might this
come from? perl -V says
Summary of my perl5 (5.0 patchlevel 5 subversion 0) configuration:
Platform:
osname=linux, osvers=2.0.34, archname=i586-linux
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O2', gccversion=2.7.2.1
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lndbm -lgdbm -ldb -ldl -lm -lc
libc=/lib/libc.so.5.3.12, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
--
Eric Marsden
emarsden @ mail.dotcom.fr
It's elephants all the way down
------------------------------
Date: Mon, 03 Aug 1998 15:57:58 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Trying to run a SCO app under RedHat 5.0
Message-Id: <35d8dd36.83540810@nntpd.databasix.com>
On Mon, 03 Aug 1998 15:05:12 GMT, in article
<6q4jj9$5gf$1@nnrp1.dejanews.com>, eculpepper@hcc-care.com wrote:
>I'm trying to run an application originally written for Transoft's UBB/UBL on
>a SCO platform.
>
>Technically the application *works* in so far as it launches UBB and from
>there I can access the app. The first hurdle I'm faced with is that at some
>point the UBB queries the OS to determine the tty the user is launching the
>app from. My problem (the problem) is that RedHat numbers the console tty's
>as tty1-tty12 where SCO is tty01-tty12. The end result is the application
>thinks its running from /dev/stderr.
You could try making matching devices. Ie if tty1 is major/minor 0 0 then
mknod tty01 c 0 0
>
>I'm theorizing this is an environment problem and not a problem with the app?
It'd be a good guess. SCO and Linux aren't as similar as one would hope.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: 3 Aug 1998 16:42:02 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Using pointers
Message-Id: <6q4p8r$htj$1@marina.cinenet.net>
John Moreno (phenix@interpath.com) wrote:
: I want to use perl to test out some C code which deals with a null
: terminated string (i.e. translate the C code to perl to test out the
: algorithm). The problem? I don't understand perl pointers.
Not surprising, as Perl doesn't have 'pointers' per se. References are
about the closest thing in the language, but often idioms in other
languages that involve pointers don't even involve references when
expressed in Perl.
: I'm using:
:
: $teststr="this is a test\x0";
At this point, $teststr 'contains' your string in sort of the same sense
as the C fragment
char* teststr = "this is a test";
would have. Just as you can pass the pointer around a C program, you can
pass the scalar containing the string around a Perl program. There's no
need for 'pointers' (references, really) in most simple programs; the
scalar mechanism mirrors the C pointer-based idiom well.
: $pointer = pack ("p", $teststr);
:
: to get the pointer, but that doesn't seem to be doing what I expect (I'm
: obviously misreading pack in the perlfunc).
That does indeed put a pointer to the data in $teststr into $pointer, but
at that point $pointer is of no further use to Perl. pack/unpack are
intended (among other things) to munge data to and from external formats
needed by other languages and applications.
: This is probably covered in
: one of the books - but I don't have any of them, just the standard
: installation, which doesn't seem to deal with pointers much.
Well, I'd certainly recommend getting at least the Llama and the Camel.
Your learning curve will be much less painful.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Mon, 03 Aug 1998 16:57:51 +0100
From: Graham Donohoe <gdonohoe@nmp.nokia.com>
Subject: Re: WANTED: Perl Autoreponder - Any Takers?
Message-Id: <35C5DDFF.68C4@nmp.nokia.com>
Wolfgang Denk wrote:
>
> David Deutsch wrote:
>
> > I'm in need of a perl based autoreponder that is called from the
> > /etc/aliases file. It will be ran under Linux with Sendmail 8.9.x and
> > must perform the following functions:
>
> Try mailagent - it's great, and it's in perl.
It's OK as long as you know some gents to mail.
Graham
>
> Wolfgang Denk
>
> --
> Office: (+49)-89-722-27328, Fax -36703 Wolfgang.Denk@oen.siemens.de
> Private: (+49)-89-95720-110, Fax -112 wd@denx.muc.de
> Hacking's just another word for nothing left to kludge.
------------------------------
Date: Mon, 03 Aug 1998 16:21:16 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: What's the difference?
Message-Id: <35C5E4EA.47F5C2F1@shaw.wave.ca>
John Porter wrote:
>
> [mailed only]
>
> Ronald J Kimball wrote:
> >
> > [1] There is even a way to use word characters, but we won't worry
> > about that right now. :-)
>
> O.k, I guess I'm not quite at guru status yet.
> So how is it done?
Well, I tried the obvious:
$var = q zstringz;
$var =~ s zizoz;
@array = qw z more than one word z;
print "$var\n";
$" = ":";
print "@array\n";
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Mon, 03 Aug 1998 17:54:39 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: What's the difference?
Message-Id: <35C5EB4F.E7F7F26F@nortel.co.uk>
Rick Delaney wrote:
>
>
> Well, I tried the obvious:
>
> $var = q zstringz;
> $var =~ s zizoz;
> @array = qw z more than one word z;
AAARGH! PERL! HOWL!!
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3328
**************************************