[8270] in Perl-Users-Digest
Perl-Users Digest, Issue: 1887 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 13 11:31:58 1998
Date: Fri, 13 Feb 98 08:00:27 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 13 Feb 1998 Volume: 8 Number: 1887
Today's topics:
Can't Install Perl <ronchi@rd.tei.ericsson.se>
convert Perl for UNIX to NT 4.0 <podurgiel@goodnewsnet.net>
error compiling Perl5.0004_04 on linux <bruno_pagis@aur.alcatel.com>
Re: FAQless Forays (was: Code Example Needed) <dformosa@st.nepean.uws.edu.au>
Re: FAQless Forays (was: Code Example Needed) (Tom Grydeland)
Re: Forgery => Killfile (Ronald L. Parker)
Re: Forgery => Killfile <camerond@mail.uca.edu>
Re: getting strings (Clay Irving)
Re: How the Hell do I...? (Dave Power)
Re: How the Hell do I...? jdporter@min.net
Re: on reading FAQs and gurus answering questions (I R A Aggie)
Re: on reading FAQs and gurus answering questions (I R A Aggie)
Re: on reading FAQs and gurus answering questions <barnett@houston.Geco-Prakla.slb.com>
Re: on reading FAQs and gurus answering questions (Honza Pazdziora)
pattern Search problem <bmaillet@cisco.com>
PC || !PC (was: FAQless Forays (was: Code Example Neede (Tom Grydeland)
Re: Perl 5 for Win32 Q: How can I determine how a scrip scott@softbase.com
Perl Compilers <vince@oxxfordinfo.com>
Perl programmers NEEDED in Wall Street Firm <someone@nowhere.com>
Problem with large amount of data in Net::SMTP->data() <henrik@xantus.se>
retrieving html files <e.christensen@netjob.dk>
Re: retrieving html files <zkessin@lhr-sys.dhl.com>
Re: RFC about "Matt's Script Archive" <dformosa@st.nepean.uws.edu.au>
Re: RFC about "Matt's Script Archive" (Nathan V. Patwardhan)
sdbm problem with NT <simon_garland@bluewin.ch>
Re: Searching for FAQs (patch to perldoc) <barnett@houston.Geco-Prakla.slb.com>
Re: Seriously Off Topic, but a Common Complaint/Problem <camerond@mail.uca.edu>
sorting an array <marga@scom.ub.es>
Re: Syntax question tobez@plab.ku.dk
Re: Text databases. Was: Should I stock up on food and (T.S. Monk)
Using list as value of hash (Ed Avis)
using Monitor.pm from the panther book a hash <agr30@uni-koeln.de>
Re: Why is Tom Christiansen so rude? (Ronald L. Parker)
Y2k: [Was: Re: Learning Perl lvirden@cas.org
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 13 Feb 1998 13:58:25 +0100
From: Luca Ronchi <ronchi@rd.tei.ericsson.se>
Subject: Can't Install Perl
Message-Id: <34E44370.3B5A@rd.tei.ericsson.se>
Hi all
I'm having big problems installing perl under Win95.
I've unzipped the archive (Pw32a315.zip) and everything seemed allright.
But when I start the install batch I get:
error, this program can't run in DOS mode.
in a DOS windows, and it ends.
If i start perl from the command line it the same. If i double click the
icon I get
Execution impossible. Wrong format
So what?
Please answer in e-mail too
Thanks
Luca
------------------------------
Date: 13 Feb 1998 15:32:53 GMT
From: "Chris Podurgiel" <podurgiel@goodnewsnet.net>
Subject: convert Perl for UNIX to NT 4.0
Message-Id: <6c1p35$rnm$0@208.207.70.134>
Is there a way to convert a Perl app made for Unix to work under an NT4.0
server?
also, I was wondering how do I have a perl script display an image in an
html page just by using an img tag? IE..
<img src="http://www.mysite.com/cgi-bin/my.pl">
is there anything special i need to do?
Thank you for your help.
Chris
------------------------------
Date: Fri, 13 Feb 1998 10:29:55 -0500
From: Bruno Pagis <bruno_pagis@aur.alcatel.com>
Subject: error compiling Perl5.0004_04 on linux
Message-Id: <34E466F2.E83650FE@aur.alcatel.com>
Trying to compile Perl5.0004_04 on a linux 2.0.33 machine,
using gcc-2.7.2.3. When doing make, I get the following
error:
./miniperl configpm tmp
./miniperl: can't resolve symbol 'h_errno'
make: xxx[lib/Config.pm]Segmentation fault
I looked up in the INSTALL file, no description on
how to solve that.
As I reinstalled my linux OS last week with this new
2.0.33 release, plus I recompiled gcc,
I would assume that I did something wrong. But what ?
Help welcome. Thanks. BRUNO.
------------------------------
Date: 13 Feb 1998 12:15:59 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <887372118.4757@cabal>
In <creepy-1202981258500001@10.0.2.15> creepy@!domain.com (sean broderick) writes:
[...]
>I'll tell you what: *you* go read a few hundred such repeated questions
>from lazy and clueless people who refuse to avail themselves of the
>hundreds of pages of free documentation
Are we not programers? Are we not lazy? Why are we reading them? I'm
shaw that we could write a bot that proccess the posts to this newsgroup
and makes RTFM replies to RTFM questions :D.
Indeed why don't we email a RTFM message to everybody the first time thay
post to this newsgroup?
[...]
--
Please excuse my spelling as I suffer from agraphia see the url in my header.
Never trust a country with more peaple then sheep.
Support NoCeM http://www.cm.org/
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: 13 Feb 1998 14:29:56 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <slrn6e8m73.4vc.Tom.Grydeland@mitra.phys.uit.no>
On 13 Feb 1998 12:15:59 GMT,
? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au> wrote:
> Indeed why don't we email a RTFM message to everybody the first time thay
> post to this newsgroup?
Indeed, I believe we do.
Try modifying your From: address next time you post.
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Fri, 13 Feb 1998 14:43:58 GMT
From: ron@farmworks.com (Ronald L. Parker)
Subject: Re: Forgery => Killfile
Message-Id: <34e55afc.6322611@10.0.2.33>
On 12 Feb 1998 22:47:18 -0600, Kent Perrier
<kperrier@Starbase.NeoSoft.COM> wrote:
>Oh good Lord! EIther go out and purchase a copy of Eudora Pro [...]
>and use the built in filter functions of these
>clients.
You don't need to. Eudora Light has filtering, for free. I have a
set of filters that kills at least 90% of the spam I receive at this
address. For example, I've never yet gotten a legit email with a
"Comments: Authenticated sender is ..." header, though I occasionally
look through the spam folder to make sure. Another good one is to
filter on "to be removed" in the body of the message. Again, no false
positives yet, except on mailing list mail that I filter to special
folders anyway and thus never run past the spam filters.
Note followups.
------------------------------
Date: Fri, 13 Feb 1998 09:34:06 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
To: Martin Oakley <meo@qld.mim.com.au.SPAMMERGOHOME>
Subject: Re: Forgery => Killfile
Message-Id: <34E467EE.6BD7D0CF@mail.uca.edu>
[cc'd to MO]
Martin Oakley wrote:
>
>
> [intro snipped]
> Well Tom probably won't see this post (if spam is a case-insensitive
> match), but I've got to point out that not everyone has an environment
> where mail filters are possible. Some, myself included, are forced to
> use M$ mailers though NO fault of their own.
> So without incoming mail filtering , one does what one can to reduce
> the clutter at the source.
>
Whoa, are you saying that whatever mail program M$ sells doesn't have
filters? I can't believe that! Under Win95, I've used NS, Eudora, and
Pegasus (freeware), and they _all_ have filter capability. If they
didn't, my main box would have 60 messages a day from the win32-perl
listservs alone. The filter is the easiest thing in the world to use. If
what you say is the case, I can't imagine that M$ can persuade _anyone_
to use its mail client, even if it comes bundled with everything M$
sells.
If your company won't let you buy another mail client, install Pegasus
Mail. It's free (try tucows or another shareware site for download, it's
transparent to the server (it doesn't care what client you use), and
works just fine.
Cameron
BTW, I hope you read the newsgroup, because I don't ever unmunge
addresses, either.
------------------------------
Date: 13 Feb 1998 08:55:22 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: getting strings
Message-Id: <6c1jca$79o@panix.com>
In <19980212184108.AAA11298@rick.internetx.net> rick@internetx.net ("Rick Bauman") writes:
>I am trying to get info from a text file . . . the format is as
>follows
>antjenn 1998/02/03 22:20:09 1998/02/03 22:22:51
>antjenn 1998/02/04 20:52:39 1998/02/04 21:13:40
>antjenn 1998/02/05 17:24:15 1998/02/05 17:26:07
>ajr 1998/02/09 18:28:19 1998/02/09 18:29:03
>ajr 1998/02/09 18:51:34 1998/02/09 19:20:00
>there is a blank line following each users entry
>the script is as follows:
>$query_string = "$ENV{'QUERY_STRING'}";
># Open logs and get the info you need
>open(SESSIONIX, "/etc/local/logscripts/userdata/sessionlog.ix");
Test the open!
open(SESSIONIX, "/etc/local/logscripts/userdata/sessionlog.ix")
or die "Can't open sessionlog.ix: $!\n";
>while(<SESSIONIX>) {
> ($userid, $therest) = split(//,$Line,2);
The data from the SESSIONIX filehandle is in $_ not $Line. If you want it
in $Line, you'll have to write:
while ($Line = <SESSIONIX>) {
Assuming your data is in $Line, "split //,$Line,2" is going to split "antjenn"
into "a" and "n" -- I think you want to split on one or more spaces like
this:
($userid, $therest) = split /\s+/,$Line,2;
> if($query_string eq $userid) {
> print $_;
Now you're using $_ instead of $Line.
> print "\<br\>"
> }
> }
>next;
>close(SESSIONIX);
>the script always returns no data . . . can anyone help me with this?
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: Fri, 13 Feb 1998 14:33:26 GMT
From: dave.power@adpdesign.com (Dave Power)
Subject: Re: How the Hell do I...?
Message-Id: <34e458fa.15287322@news.virgin.net>
Before posting my question, which I admitted was embarrassing, I spent
two weeks and $150 reading books - none of which gave me the answer.
I thought seriously about the responses that I might receive from this
group. However, I figured that a few insults would be worth it in the
long run.
Having sufferred the anticipated diatribes (under this thread and
another) I now know how to delete a file...wonderful!
Finally, one thing which is more important than Perl is simple common
courtesy. I would hope that, should I ever find myself in the
situation of responding to requests for info I would behave with a
certain amount of dignity.
Regards
DP
Simple, straight forward and honest!
------------------------------
Date: 13 Feb 1998 09:52:43 -0500
From: jdporter@min.net
Subject: Re: How the Hell do I...?
Message-Id: <6c1mnr$8md@min.net>
In article <6bv33m$asu$3@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, Marc.Haber-usenet@gmx.de (Marc Haber) writes:
>:Tom surely is working rather hard to get people to read the docs.
>
>This is my only goal. Maybe I'll work out a standard response.
>But some people will always be offended when they're told
>that the answer they seek is on their own system. . .
It occured to me that in all these responses from Tom, which
some folks find obnoxious, he has never once (AFAIK) admonished
the clueless to go buy and read his book. I think that says
something about his integrity.
John Porter
------------------------------
Date: Fri, 13 Feb 1998 09:01:23 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <fl_aggie-1302980901230001@aggie.coaps.fsu.edu>
In article <6bvdic$nj3$1@nz12.rz.uni-karlsruhe.de>,
Marc.Haber-usenet@gmx.de (Marc Haber) wrote:
+ But you gotta see Usenet as a whole, not only clpm. Who doesn't have a
+ clue about perl might be a Windows NT, X or hardware wizard and may
+ perhaps spend as much time as you do here "answering" FAQs in "his"
+ home group.
And they're usually _clueful_ folks. I see a whole lot of _clueless_
folks around here, and I doubt they're answering FAQs too often. Being
clueless isn't a crime.
Being willfully clueless _is_.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Fri, 13 Feb 1998 09:07:37 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <fl_aggie-1302980907370001@aggie.coaps.fsu.edu>
In article <6bvta0$9g1@fridge.shore.net>, nvp@shore.net (Nathan V.
Patwardhan) wrote:
+ Again, I'll ask you, when's the last time that you've seen Larry
+ around these parts?
Ummm...Never? I don't think clp.misc existed when I last saw a live
posting from Larry.
+ Those of us who want a community migrate to mailing lists or moderated
+ newsgroups, it seems.
A pity. I really don't like moderated newsgroups...
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Fri, 13 Feb 1998 08:06:16 -0600
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <34E45358.5929AFCB@houston.Geco-Prakla.slb.com>
Russ Allbery wrote:
>
> Marc Haber <Marc.Haber-usenet@gmx.de> writes:
>
> > "Give a little, get a little" is the formular that makes Usenet work.
> > But you gotta see Usenet as a whole, not only clpm. Who doesn't have a
> > clue about perl might be a Windows NT, X or hardware wizard and may
> > perhaps spend as much time as you do here "answering" FAQs in "his" home
> > group.
>
> I would be delighted if this were, in fact, the case, but unfortunately
> it's not. And even then, I have no problems answering questions from
> people who don't yet know enough about any topic to be able to answer
> questions themselves. I don't mind, and even enjoy, paying forward to the
> next generation.
>
> It would be nice to see some acknowledgement from the people being helped
> that that's what it is, though, and that they have a responsibility now to
> the community as a whole to help out when *they* can. Some people
> understand this. Depressingly many don't.
<snip>
Well, as a member of the next generation, I would like to express my
gratitude to those who have answered my questions. Often I don't do
that in the newsgroup, just to cut down the "noise".
I really do appreciate the help, and will answer questions when I feel I
know the answer. Sometimes I find that I don't quite know the answer as
well as I thought I did. Learning continues.... :-)
Thanks again.
Dave
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
------------------------------------------------------------------------
* Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com *
* DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com *
------------------------------------------------------------------------
------------------------------
Date: Fri, 13 Feb 1998 15:04:33 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <adelton.887382273@aisa.fi.muni.cz>
fl_aggie@thepentagon.com (I R A Aggie) writes:
> + Those of us who want a community migrate to mailing lists or moderated
> + newsgroups, it seems.
>
> A pity. I really don't like moderated newsgroups...
Why? It seems to me that a moderated newsgroup would be much better
than clpm as it is now. I like to answer easier questions, I like to
read gurus' answers to more difficult questions. I'd like to read
opinions on Perl and modules and books, discussion about the language,
its use and its future. I do not like answering FAQ's and I'm not
really interested in reading answers to them.
I think everyone agrees that there are too many questions that are
already answered in docs in clpm nowadays. The problem is how to drive
them out and I do not believe that any strategy we would develop for
answers (being polite, being rude, being strict, being verbose,
whatever) would help since the people who send such questions do not
read the previous answers in the newsgroup.
That's why I would really prefer moderated newsgroup. I'm not familiar
with the process of creating and running such a thing but am ready to
offer any help I can.
Yours,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Fri, 13 Feb 1998 10:17:41 -0500
From: Bob Maillet <bmaillet@cisco.com>
Subject: pattern Search problem
Message-Id: <34E46415.8569FEE@cisco.com>
After I enter this pattern search and replace: $_=~s/\.\ \;
[^.]/\.\ \; [^A-Z]/g;
The output prints This is a test. [A-Z]his is only a test. [A-Z]o not
attempt to adjust your television.
How can I get the case to change here? My output is printing [A-Z]
instead of the letter I would like change case on.
Bob
------------------------------
Date: 13 Feb 1998 14:28:58 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: PC || !PC (was: FAQless Forays (was: Code Example Needed))
Message-Id: <slrn6e8m5a.4vc.Tom.Grydeland@mitra.phys.uit.no>
On Fri, 13 Feb 1998 10:30:09 GMT,
Bart Lateur <bart.mediamind@tornado.be> wrote:
> >If it has more then one user then it is not a PC.
> Honostly, many full blown respectable software developers program on
> their private Unix workstation. Which is then, by your definition, a PC.
> So these people are dumb?
Note that the claim was:
More than one user => ! PC
not
Only one user => PC
By the definition given, it's perfectly possible to have a machine with
only one user which is not a PC. Only PCs with more than one user is
forbidden.
> Bart.
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 13 Feb 1998 12:30:01 GMT
From: scott@softbase.com
Subject: Re: Perl 5 for Win32 Q: How can I determine how a script was executed?
Message-Id: <6c1ec9$4gd$2@mainsrv.main.nc.us>
Keith Lomax (lomax_nt@paranor.ch) wrote:
> Is there a more elegant solution for determining how a Perl script was
> invoked in WinNT?
No, there is not. The user can establish the default for all
command prompts to stay open until explicitly closed, by
setting cmd.exe's properties (I think) but it's out of
your control.
Starting a Perl program from Explorer is a bad idea in general.
I'd just put a note in the documentation for the program
not to run it that way. Perl is so inherently command line
oriented that you need an open, stable command prompt to
run Perl programs.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Fri, 13 Feb 1998 09:18:08 -0500
From: "Vince M." <vince@oxxfordinfo.com>
Subject: Perl Compilers
Message-Id: <6c1l7i$c8f$1@Usenet.Logical.NET>
Hi,
This may be a naive question -- does anyone know if a true compiled version
of Perl exists? I have a need for speed...
Thanks in advance.
Vince
------------------------------
Date: Thu, 12 Feb 1998 19:09:18 -0500
From: "L. Wong" <someone@nowhere.com>
Subject: Perl programmers NEEDED in Wall Street Firm
Message-Id: <34E38F2E.F8928BCD@nowhere.com>
We are desperately looking for perl programmers to work in a Fortune 500
Wall Street firm. If you have at leat 1-2 years Perl 5 then page me at:
1800-467-3700 (numeric)
1800-225-0256 (text)
PIN: 598-4999 for both 800 numbers.
PS. Java/Web experience is a huge plus.
------------------------------
Date: Fri, 13 Feb 1998 16:21:31 +0100
From: Henrik Carling <henrik@xantus.se>
Subject: Problem with large amount of data in Net::SMTP->data()
Message-Id: <34E464FB.47C4@xantus.se>
Hello!
I am having a problem when I pass a large list to the data() method in
the Net::SMTP module.
The limit seems to be around 200 kB, above which the transfer will fail
and eventually time out.
When debugging is turned on ( Net::SMTP->new(..., Debug => 1..)), the
content of the list scrolls happily by, and the transmission starts, but
after a few 10:s of kilobytes the transmission of data stops.
I have tried a handful of recipients, including 'localhost' (to see if
it was a timing problem), but the behavour is consistent; as soon as the
list gets too large, the transmission will fail.
Here is a small program to demonstrate the problem.
=======================================================================
#!/usr/bin/perl
use Net::SMTP;
$filname = shift @ARGV;
open (IF, $filnam) or die "Could not open file: $!";
$nl=0;
while ($rad = <IF>)
{
push(@dat,$rad);
$nl++;
}
close IF;
print "read $nl lines\n";
$smtp = Net::SMTP->new('any.mail.host',
Hello => 'your.domain',
Timeout => 120,
Debug => 1,
);
$smtp->mail("you\@yourdomain.domain");
$smtp->recipient("someone\@somedomain.domain");
$smtp->data(@dat);
$smtp->quit();
=======================================================================
In my "real" application I try to trap the errors, but this problem just
"hangs" and then times out.
Here's an excerpt from my mail-log file for a failed transmission:
=======================================================================
Feb 13 16:19:30 pauling sendmail[2080]: collect: premature EOM: Error 0
Feb 13 16:19:30 pauling sendmail[2080]: collect: unexpected close on
connection from begin.xint.se, sender=<henrik@xantus.se>: Error 0
=======================================================================
I'm running this on a RedHat Linux 4.2 machine with
Kernel rebulit for IP-masquerading.
Perl version 5.004_01 (installed from the RedHat rpm)
libnet version 1.0605
I would be very grateful if someone could help, or point me to
information
concerning this problem.
/Henrik
henrik@xantus.se
------------------------------
Date: Fri, 13 Feb 1998 13:54:13 +0100
From: Ernst <e.christensen@netjob.dk>
Subject: retrieving html files
Message-Id: <34E44275.11CD@netjob.dk>
Hi
I think this is a simple question:
How do I get a file from a remote webserver, without using the LWP
module (I am not allowed to install this module on our server).
reg
Ernst
------------------------------
Date: 13 Feb 1998 14:03:47 +0000
From: Zachary Kessin <zkessin@lhr-sys.dhl.com>
Subject: Re: retrieving html files
Message-Id: <m3vhujsit8.fsf@pc-hhu-52.lhr-sys.dhl.com>
Ernst <e.christensen@netjob.dk> writes:
> Hi
>
> I think this is a simple question:
> How do I get a file from a remote webserver, without using the LWP
> module (I am not allowed to install this module on our server).
>
> reg
> Ernst
Well, basicly you will have to install it or re-write it. Could you
perhapse install it in a private directory? Why cant you install it?
Is it that someone thinks it will compromize security to let people
install things or what?
Look at the book "Web Client programing with Perl".
--Zach
------------------------------
Date: 13 Feb 1998 12:46:24 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: RFC about "Matt's Script Archive"
Message-Id: <887373943.186293@cabal>
In <EoAsAq.LI7@world.std.com> c28f62@world.std.com (Mark Kramer) writes:
[...]
>Can anyone reading this thread, where Matt has been referred to as
>either evil or bad, wonder why people don't jump up and down with glee
>at the thought of giving their code to this group?
IMHO that is a good thing. If your code is such that it can't stand a
whole lot of vultures picking over it then is it good enought to use?
--
Please excuse my spelling as I suffer from agraphia see the url in my header.
Never trust a country with more peaple then sheep.
Support NoCeM http://www.cm.org/
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: 13 Feb 1998 14:44:19 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: RFC about "Matt's Script Archive"
Message-Id: <6c1m83$les@fridge.shore.net>
Mark Kramer (c28f62@world.std.com) wrote:
: Yes, some do, but many more don't. All those people who don't consider
: it worth their while to "donate" if they may be labelled "evil" for the
: way they write their code. Remember that old chestnut: there's more
Tell you what. Write a bunch of software, then write a book about
it. Or, write a book about someone else's software.
You'll see what I (we?) mean about the importance of providing
correct, secure, and valid code and information. There's *nothing*
more frightening than being part of something that's teaching bad
habits or wrong information, and even more disheartening, reading
something that's wrong wrong wrong.
The people who write buggy software are compelled to rewrite it
if/when asked.
I learned this (albeit a hard, and at times, unpleasant) lesson from
Tom and others, but I know full well what they meant. Matt's stuff is
no exception.
--
Nathan V. Patwardhan
------------------------------
Date: Fri, 13 Feb 1998 16:38:04 +0100
From: "Simon Garland" <simon_garland@bluewin.ch>
Subject: sdbm problem with NT
Message-Id: <6c1p3n$i3u$1@bw107zhb.bluewin.ch>
I'm a perl newcommer, and am trying unsuccessfully to get a script that has
worked for years under unix (WikiWiki web server) to work on NT (NT4.0 sp3).
The script fails when putting a lump of text into a database, it works fine
if the text is small, but above about 330 characters I get the following
error message:
sdbm store returned -1, errno 9, key "TextFormattingRules" at
O:\web\cgi-bin\wiki line 286.
the offending code is:
..
sub ReplacePage {
local($title, *page) = @_;
local($value, @value);
$page{date} = $DateToday;
$page{host} = $ENV{REMOTE_HOST};
$page{agent} = $ENV{HTTP_USER_AGENT};
$page{rev}++;
@value = %page;
$value = join($FieldSeparator, @value);
open (WDB, ">$DataBase.wdb/$title");
print WDB $value;
close WDB;
$db{$title} = $value;
}
# -------------------------------------------------------- ReplacePage
..
the line in question is the $db{$title}.. one, the problem occurs on both
FAT and NTFS drives.
is there some MaxTextSize parameter that can be set somewhere that has a
default (too low..) value for NT?
what is error 9? (and where could I have found that for myself?)
thanks for any help.. /Simon
------------------------------
Date: Fri, 13 Feb 1998 08:58:24 -0600
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: Searching for FAQs (patch to perldoc)
Message-Id: <34E45F90.CD534C4C@houston.Geco-Prakla.slb.com>
Piers Cawley wrote:
>
> What with all the recent kerfuffle about folks being too lazy to
> search the FAQs properly I thought it might be a good idea to share
> the following patch to perldoc.
GREAT!!!! Thank you.
> In the spirit of the ever popular
> 'perldoc -f FuncName' I offer, 'perldoc -q RegEx', which searches the
> list of faqs for questions that match the given regex and prints them
> out, together with the appropriate answer and some indication of the
> particular .pod they came from. Eg:
>
> $ perldoc -t -q 'larry wall'
I had trouble with the two following things:
1.
<snip>
current> ***************
current> *** 73,79 ****
current>
current> unshift(@ARGV,shellwords($ENV{"PERLDOC"}));
current>
current> ! getopts("mhtluvf:") || usage;
current>
current> usage if $opt_h || $opt_h; # avoid -w warning
current>
new> --- 80,86 ----
new>
new> unshift(@ARGV,shellwords($ENV{"PERLDOC"}));
new>
new> ! getopts("mhtluvf:q:") || usage;
new>
new> usage if $opt_h || $opt_h; # avoid -w warning
Use the "new" one.
<snip>
2.
> ***************
> *** 337,342 ****
> --- 346,384 ----
> + if ($opt_q) {
> + local @ARGV = @found; # I'm lazy, sue me.
> + my $found = 0;
> + my %found_in;
> + my @pod;
<snip>
> + } else {
> + die "No documentation for perl function `$opt_f' found\n";
Needs to read:
die "No documentation for perl funciton '$opt_q' found\n";
Otherwise, just prints:
No documentation for perl function '' found
> }
> exit;
> }
>
> --
> Piers Cawley
> If a `religion' is defined to be a system of ideas that contains
> unprovable statements, then Godel taught us that mathematics is not
> only a religion, it is the only religion that can prove itself to be
> one. -- John Barrow
Very cool.
Dave
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
------------------------------------------------------------------------
* Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com *
* DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com *
------------------------------------------------------------------------
------------------------------
Date: Fri, 13 Feb 1998 09:15:49 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
To: Denis Goddard <dgoddard@us.oracle.com>
Subject: Re: Seriously Off Topic, but a Common Complaint/Problem in this NG
Message-Id: <34E463A5.2E8DD720@mail.uca.edu>
Denis Goddard wrote:
>
> [instructions on wordwrapping snipped]
Dennis, I'm doing all that, in fact it was the first thing I did when I
started using the NS newsreader. What the NS newsreader is doing which I
have to manually overwrite is: When a post comes in that I reply to and
quote some of the original, the post is treated like there are hard
returns in it. If the "> "+[original line] is greater than my linewrap
length, as an example, if I quote something of mine that you previously
quoted:
> > Is there a feature of NS that I'm missing (surely some of you use
> NS,
> > maybe even some of the real programmers)?
then it gets chopped. That's what people are miffed about, and that's
what I would like to automatically fix, short of writing my own
newsreader.
Perhaps now that NS's code is in the public domain, this problem will be
seen by someone who knows what he/she is doing, and can be fixed easily.
Cameron
------------------------------
Date: Fri, 13 Feb 1998 14:56:25 +0100
From: MR <marga@scom.ub.es>
Subject: sorting an array
Message-Id: <34E45108.84D2E0F5@scom.ub.es>
Hello,
I have an array of keys with this patern: xxxxYYYY where xxxx is a fixed
char and YYYY are numbers. I want to sort the array by numeric valor of
YYYY. There is a
simple method???
Something like:
sub bynumber { "ubppp".$a <=> "ubppp".$b; }
@sort_keys = sort bynumber @keys;
Thanks
------------------------------
Date: Fri, 13 Feb 1998 14:49:15 +0100
From: tobez@plab.ku.dk
Subject: Re: Syntax question
Message-Id: <34E44F5B.792E@plab.ku.dk>
Helmut Jarausch wrote:
1)
> can anybody explain what is going on if I say
>
> print STDERR ("something went wrong\n"), exit if 2 > 1;
Perl thinks (correctly) that exit here is an argument to print
(print as a list operator, remember!).
All the arguments are evaluated before the actual call to print,
so the program exits before print even gets called.
It's very easy to fix:
(print STDERR "something went wrong\n"), exit if 2 > 1;
is one way, and
print (STDERR "something went wrong\n"), exit if 2 > 1;
is another.
> Here I don't see anything printed. Exit seems to be so fast,
> that some buffers (although STDERR isn't buffered) are lost.
Buffering has nothing to do with it, right?
2)
> If there is a syntax error or runtime error, or a die() statement is
> executed, an undefined value is returned by eval()
Who says that undefined value cannot be returned from eval
in normal circumstances?
> This seems to imply that it doesn't return UNDEF if there are no errors,
> but...
There is no such implication. The statement from perldoc only
describes what eval returns in the case of error, nothing more!
> defined(eval <<"EOS") or die "eval failed $@";
> sub OK
> { return \$X <= $C; }
> EOS
Should be written as
eval <<"EOS"; not $@ or die "eval failed $@";
sub OK
{ return \$X <= $C; }
EOS
I.e., check for a value of $@ instead; another way is
defined(eval <<"EOS") or die "eval failed $@";
sub OK
{ return \$X <= $C; }
1;
EOS
I.e., if you check for undefined result of eval, than at least
make sure that in normal conditions eval will return
something meaningful.
Hope this helps,
Anton.
------------------------------
Date: Thu, 12 Feb 1998 13:50:10 GMT
From: UNBOLT.ME-ts_monk@hotmail.com (T.S. Monk)
Subject: Re: Text databases. Was: Should I stock up on food and buy an AK-47?
Message-Id: <34e2e71f.3483447@news.binc.net>
On Wed, 11 Feb 1998 21:27:30 -0500, The Goobers <docdwarf@erols.com>
wrote:
---< *snip* OW! >---
>Does he prefer the Classical Gopher or the Romantic Gopher?... or does
>he show himself to be a purist and Gopher Baroque?
>
>DD
Um... yes!
===============================
UNBOLT.ME-ts_monk@hotmail.com
===============================
Sorely mistaken. Just because
you may able to function
passably well is no indication
that anyone else can. Some
will be able to function. Most
won't.
- Paul Milne
===============================
Plain, simple and to the point.
===============================
------------------------------
Date: Fri, 13 Feb 1998 15:10:47 GMT
From: epa@datcon.co.uk (Ed Avis)
Subject: Using list as value of hash
Message-Id: <34e45fd3.277142319@news-direct>
My program reads in a list of "IDs" and associated "names". Each "ID"
has zero or more "names" associated with it. For example
NAME ID
apple 2
pear 2
goat 3
bear 4
banana 2
Here the ID "2" is associated with the names "apple", "pear" and
"banana". The ID "3" is associated with "goat", and "4" with "bear".
My program reads in a file which looks like the table shown above.
I was using:
open (IF, "filename");
while (<IF>)
{
@words = split;
$id = $words[1];
$name{$id} = $words[0];
}
but the problem is, this only allows one name to be associated with
each ID.
What I'd like to do is something like this:
while (<IF>)
{
@words = split;
$id = $words[1];
@names{$id} = (@names{$id}, $words[0]); #!
}
where the hash stores a list of names that correspond to each ID.
Later on, I need to look up an ID in the hash and find the list of
names it maps to.
I couldn't find anything on this in the FAQ or "Learning Perl", please
help.
Thanks,
--
Ed Avis
------------------------------
Date: 13 Feb 1998 14:55:23 +0100
From: Martin Bialasinski <agr30@uni-koeln.de>
Subject: using Monitor.pm from the panther book a hash
Message-Id: <87oh0bhano.fsf@haitech.internet-treff.de>
Hi,
the Monitor.pm example on page 147f. is missing the CLEAR, FIRSTKEY and
NEXTKEY subs.
CLEAR is trivial, but how do you code {FIRST,NEXT}KEY efficiently?
You could create a {key => nextkey} hash on FIRSTKEY and store it in the
object so that NEXTKEY could do the lookup easily. When NEXTKEY reaches
the last key, this hash would be deleted.
Is there a better solution?
Ciao,
Martin
------------------------------
Date: Fri, 13 Feb 1998 14:49:28 GMT
From: ron@farmworks.com (Ronald L. Parker)
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <34e75d26.6876878@10.0.2.33>
On 12 Feb 1998 17:00:28 -0500, clay@panix.com (Clay Irving) wrote:
> This command:
>
> Tom -w "How do I configure Microsoft IIS to recognize Perl?"
>
> will output text similar to:
>
> Don't be a PoB. Get a real OS. Besides you're question has
> nothing to do with Perl.
>
Only if you specify the undocumented option that specifies bad
grammar, or if /usr/dict/words is not present. Tom's grammar is
usually impeccable.
------------------------------
Date: 13 Feb 1998 14:53:42 GMT
From: lvirden@cas.org
Subject: Y2k: [Was: Re: Learning Perl
Message-Id: <6c1mpm$krq$1@srv38s4u.cas.org>
According to Carey Evans <c.evans@clear.net.nz>:
:Did you know there are no plans to make Perl 4 Y2K compliant? Do your
:managers?
You know, one thing that puzzles me on this newsgroup. Folk post on
a regular basis asking whether there are any known Y2k problems.
They are, as expected, referred to the fine, but a year old, FAQs.
I suspect in most cases they haven't looked there first.
However, whether or not, it is frequently the case that I see in this
group, and a few others, insults over even thinking such a thing.
Yet I also see, on a regular bases, the above statement - either in
truth or as a 'threat' to try to force folk to upgrade whether they
wish to or not.
Is it really any wonder that some folk are confused about the issue when
apparent mixed messages are posted on a regular basis?
--
Larry W. Virden <URL:mailto:lvirden@cas.org> ICQ: 5744965
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1887
**************************************