[16585] in Perl-Users-Digest
Perl-Users Digest, Issue: 3997 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 12 14:05:36 2000
Date: Sat, 12 Aug 2000 11:05:14 -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: <966103513-v9-i3997@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 12 Aug 2000 Volume: 9 Number: 3997
Today's topics:
ANNONCE: Sideways 'shoot'em up' in Perl <tripix@metaverse.fsnet.co.uk>
Re: Checking the IP and reverse (Colin Keith)
Re: chmod question (u2orange)
Re: CPAN problem (Colin Keith)
Re: dbi odbc placeholder problem (Colin Keith)
Re: Digest MD5 of Perl (Colin Keith)
Re: GREP - type of script... <elephant@squirrelgroup.com>
How to submit a form from the browsers' address bar? <eliste@demokratik.net>
Re: London =?iso-8859-1?Q?=A330=2D35K?= Perl Programmer <mc@mctech.org>
Re: Negativity in Newsgroup <chris@spagnet.com>
Re: Negativity in Newsgroup (Abigail)
Re: Negativity in Newsgroup <bkennedy99@home.com>
Re: Negativity in Newsgroup <godzilla@stomp.stomp.tokyo>
Re: Negativity in Newsgroup <bkennedy99@home.com>
Re: Negativity in Newsgroup <godzilla@stomp.stomp.tokyo>
Re: Negativity in Newsgroup kevin+usenet@suberic.net
Re: Negativity in Newsgroup (Keith Calvert Ivey)
Re: Newbie: can't run my test script at my Web Host (Colin Keith)
Re: open, close dial-up connexion under Win32 <carvdawg@patriot.net>
Re: Perl code for a newbie!! (Keith Calvert Ivey)
Re: perl program running with cgi extension (Abigail)
Re: perl program running with cgi extension (Abigail)
Re: perl script (Keith Calvert Ivey)
Re: Pipe on WinNT <carvdawg@patriot.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 12 Aug 2000 15:01:38 +0100
From: Wayne Keenan <tripix@metaverse.fsnet.co.uk>
Subject: ANNONCE: Sideways 'shoot'em up' in Perl
Message-Id: <399558C2.EF861D66@metaverse.fsnet.co.uk>
Hi, going boldy....
The Perl SDL bindings (www.libsdl.org) I've been working on, now have a new
example,
a sideways shoot'em up arcade game!. (25-30 fps on my 'humble' machine!)
Navigate through:
http://freshmeat.net/appindex/2000/08/04/965424836.html
to the screenshots to have a look at some static pics, and download if you wish.
(sorry about the indirect link, but I'm liable to move site soon, and
that seemed the best fixed place)
All the Best,
Wayne Keenan
------------------------------
Date: Sat, 12 Aug 2000 14:11:12 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: Checking the IP and reverse
Message-Id: <4Wcl5.101$DT4.3363214@nnrp2.clara.net>
In article <8n1m56$4dj$1@nnrp1.deja.com>, Hermann <hermann@wecke.de> wrote:
>First step: 10.10.10.1 -> port1.foo.com
>Second step: port1.foo.com -> 10.10.10.1
>Any further references to look into?
Net::DNS.pm
From reading the man page for it, it appears that the authors are the
same. Anyway, here's a quickie script I ran up to do what you want.
#!/usr/bin/perl -w
use strict;
use Net::DNS;
my($resolver) = Net::DNS::Resolver->new();
my($query);
die "$0: <hostip>\n" if(!$ARGV[0]);
my($hostip) = $ARGV[0];
# Get hostname from IP
my($ip_to_host) = fwd_or_rev($hostip, 1);
die "Timedout/error" if($ip_to_host eq '-1');
die "Invalid host" if(!$ip_to_host);
# Get IP from hostname we found
my($host_to_ip) = fwd_or_rev($ip_to_host);
die "Timedout/error" if($host_to_ip eq '-1');
die "Invalid host" if(!$host_to_ip);
$_ = ($host_to_ip ne $hostip) ? ' *not*' : '';
print "Fwd/Rev do$_ match: '$hostip' => '$ip_to_host' => '$host_to_ip'\n";
# And the workhorse fn
sub fwd_or_rev {
my($type) = $_[1]?'PTR':'A';
$SIG{ALRM} = sub { die 'TIMEOUT'; };
eval {
alarm(3); # time out if we don't get a response in 3 secs
$query = $resolver->query($_[0], $type);
alarm(0);
};
return -1 if($@ =~ /TIMEOUT/); # ugly
return 0 if(!$query || !(@_ = $query->answer())); # bad
return $type eq 'A' ? $_[0]->address() : $_[0]->ptrdname(); # good
}
Now, before anyone screams. It does not handle multiple IP/hostname's being
returned, nor does it handle the fact that the hostname that's returned
could be a CNAME to an IP .. Ya want this, just extrapolate what you have
here.
To do what the you wanted, wrap the main program in a loop and let it go.
Examples:
phoebe% ./x 195.8.69.8
Fwd/Rev do match: '195.8.69.8' => 'www.clara.net' => '195.8.69.8'
phoebe% ./x 195.8.69.20
Fwd/Rev do *not* match: '195.8.69.20' => 'home.clara.net' => '195.8.69.65'
(home.clara.net has two A records, if they have been returned in the same
order it would have been okay, so you should check this before production
use)
Col.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Sat, 12 Aug 2000 18:02:37 GMT
From: u2o@u2orange.co.uk (u2orange)
Subject: Re: chmod question
Message-Id: <39959107.7890480@news.freeserve.net>
Try this:-
open (DATAFILE,">$orderfile");
system ("chmod 0777 $orderfile");
close(DATAFILE);
Hope it helps you..!
Mat.
On Fri, 11 Aug 2000 16:55:52 GMT, "Cal Bond"
<webmaster@cool-movie-trivia.com> wrote:
>Hi,
>
>Basic newbie question. I've been trying to get the chmod command to work on
>a batch of files I want to write to. I've been using
>
>chmod (0777, $filename);
>
>in the loop where the program is running through each filename, supposedly
>to open the file and write to it. This has not been working. If I go
>through an FTP program like CuteFTP and set the chmods of each file to 777
>that way, everything works fine, so I know the filename path etc are
>correct. Could this be a server-related problem that they don't accept
>chmod command from perl? Any other ideas on what I can try? Thanks very
>much.
>
>Cal
>
>
------------------------------
Date: Sat, 12 Aug 2000 14:25:27 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: CPAN problem
Message-Id: <r7dl5.102$DT4.3365413@nnrp2.clara.net>
In article <ZmSk5.31126$RG6.2439604@bgtnsc05-news.ops.worldnet.att.net>, "Herbert Moses" <herbmoses@worldnet.att.net> wrote:
Hmmm, cute, your -- was taken by my news reader as meaning a break between
the message and the .sig .. Confused me for a moment :) Still I've just had
to fight with a bottle of coke to open it, so I'm putting it down to 'just
one of those days' ...
I think its because their server is correctly configured. When you're
connecting, its decompressing the file on the fly, but lynx is still handing
it off to gzip. Try lynx -dump > out && file out and see if it comes back
as plain text.
It works for me at least.
Col.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Sat, 12 Aug 2000 15:06:27 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: dbi odbc placeholder problem
Message-Id: <TJdl5.103$DT4.3369474@nnrp2.clara.net>
In article <8n3fst$ats$1@nnrp1.deja.com>, dr_dubosc@my-deja.com wrote:
>###THIS EXECUTES .....
>my $rc = $dbh->do(q |delete from mytable where id = 30 |,undef)
>###BUT THIS DOESN'T.....
>#my $rc = $dbh->do(q |delete from mytable where id = ? |,undef, 30 )
>It doesn't work if I explicitly prepare and execute the query, either.
There goes answer 1 :)
>The (access driver) complaint is of a type mismatch in the parameter.
Urm, do you have more success if you use bind_param() to tie a value to a
placeholder?
Is it something really daft like the fact that placeholders get ' quoted ?
so you're trying to say "where id = '30' " in an INT column ? If this is the
case you shouldn't get an error if you match on a text type column, say
('select * from mytable where jobowner = ?', undef, 'bob')
Col.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Sat, 12 Aug 2000 15:12:56 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: Digest MD5 of Perl
Message-Id: <YPdl5.104$DT4.3370161@nnrp2.clara.net>
In article <8mvqej$nqd$1@nnrp1.deja.com>, rchan@echarge.com wrote:
> >The name specified is not recognized as an
> >internal or external command, operable program or batch file.
You don't have your path,configured correctly so the install isn't finding
the files. Add the extra path's to %PATH% (or is it $PATH under NT?) and
retry.
>When I executed the test.pl, I got the following error:
You would, the module failed to install.
Col.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Sat, 12 Aug 2000 13:19:36 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: GREP - type of script...
Message-Id: <MPG.13ffec4fedd9df419896ab@localhost>
Bart Lateur wrote ..
>jason wrote:
>
>>the comment in perldiag would seem to suggest that the method of doing
>>the in-place edit is not as simple as this .. it would seem that the
>>actual method does some sort of read from an opened but deleted file
>
>In what is that different from what I described? Except that, uh, you
>don't actually need the temporary renaming of the file. Just open and
>unlink. On Unix, it works. So what you're paraphrasing from the docs is
>actually even simpler, than my original scheme:
>
>: * The old file is renamed to a temporary backup name.
>: * A new file is created with the same path as the old file had. It
>: remains open for writing.
>: * The backup file is opened for reading.
>: * Then, the name is deleted from the directory listing (AKA
>: "unlinked"); but the file still exists since it's open.
>
>Make that:
>
> * The old file is opened for reading
> * Then, the name is deleted from the directory listing (AKA
> "unlinked"); but the file still exists since it's open.
> * A new file is created with the same path as the old file had. It
> remains open for writing.
>
>3 steps instead of 4.
but that second step is not in the Win32 arsenal .. the perldiag
explanation would suggest that you can't read from an unlinked file on
Win32 .. hence my posting
my point was simply that it wasn't an implementation bug - but rather a
limitation in Win32 that meant that they couldn't do the in-place edit
without that backup file
I guess the decision was made that since the only way to implement it on
Win32 was to use a backup file that they may as well make the user use
(and hence remove) that backup file
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Sat, 12 Aug 2000 17:33:31 GMT
From: Oktay <eliste@demokratik.net>
Subject: How to submit a form from the browsers' address bar?
Message-Id: <39958959.2B584171@demokratik.net>
How to submit a form from the browsers' address bar?
Hello,
I have a below form.
I would like to submit the information on this form using a single line
like this
http://dmoz.org/cgi-bin/add2.cgi?submit=1&index=67a9698c86ae0e789c8b85407fb3d8d6&where=Recreation/Humor&lk=&url=http://test.com&description=this+is+description&email=test@test.com
I was unseccesful so far.
Can anybody help me to achieve this?
Thank you all in advance
<form method="post" action="http://dmoz.org/cgi-bin/add2.cgi">
<input type="hidden" name="index"
value="67a9698c86ae0e789c8b85407fb3d8d6">
<input type="hidden" name="where" value="Recreation/Humor">
<input type="hidden" name="lk" value="">
<input type="text" size="40" name="url" value="http://">
<input type="text" size="40" name="title" maxlength="100">
<textarea maxlength="300" rows="8" cols="40" wrap="virtual"
name="description"></textarea>
<input type="text" size="40" name="email">
<input type="submit" value="Submit">
</form>
--
_______________________________
http://demokratik.net
ucretsiz isminiz@demokratik.net
formatinda eposta hesabi ve
"HERKESE AMA HERKESE SOZ HAKKI"
------------------------------
Date: Sat, 12 Aug 2000 10:24:30 -0400
From: MC <mc@mctech.org>
Subject: Re: London =?iso-8859-1?Q?=A330=2D35K?= Perl Programmers Required
Message-Id: <39955E1E.F6D9B21B@mctech.org>
> Don't be silly. "Longstanding Usenet tradition" dictates that newsgroups
> are flooded with spam, trolls, job postings, all-encompassing theories
> of the universe put forth by lunatics and cranks, and of course live nude
> jpegs of Britney Spears.
>
Hmmmmm. I think im missing some posts in this newsgroup, I aint seen these pics
of Ms Spears. <G>
>
> It's only "long-suffering purists" who dictate otherwise.
--
---------------------------------------------------------------------
My email address(s) are my private property. They are NOT to be used
or recorded for ANY reason without my explicit permission. Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"The world wont end with a bang, or even a whimper, but with an error
message." -- format C:
------------------------------
Date: Sat, 12 Aug 2000 11:04:28 -0400
From: Chris Barnabo <chris@spagnet.com>
Subject: Re: Negativity in Newsgroup
Message-Id: <MPG.13ff31874da53639896a4@news.supernews.com>
On Sat, 12 Aug 2000 00:19:16 -0700, Steve Leibel <stevel@bluetuna.com> said
> I challenge everyone in this newsgroup to stop for a moment the next time
> you're going to say "read the FAQ" or "Perldoc irrelevant" to an earnest
> question, and either A) Give a straightforward specific complete
> professional answer, like you would if your professional colleague was
> asking you the question; or B) Don't say anything at all.
>
> Do you really think that would be such a threat to the Perl world?
Well ... it _might_ be a threat to the Perl world, actually, especially if
people resort to option "B". We then run the risk of becoming more like
the comp.lang.java.* and comp.lang.javascript newsgroups, where very many
questions are simply never answered at all.
I'm a relative newbie to Perl and to c.l.p.m but not to Usenet (and yes, a
search of www.deja.com will show that I generally lurk but occasionally
arise to stick my foot in my mouth). My first readings in c.l.p.m did show
quite a degree of abruptness so I kept my questions to myself for a while
and continued to read.
What I found was that even the abrupt answers *were* answers - many of them
pointed to vast resources like the FAQs, perldoc, CPAN, etc. that I had
been ignorant of in my haste to "get going". When I started exploring
those resources, I found the answers to just about all my questions.
All of us, whether we're newbies, experts, esteemed regulars, or
occassional visitors, have got limited time on our hands. I'd far prefer
that an often-asked question get abruptly answered with "perldoc perlfaq4"
than simply ignored - that answer potentially helps a lot of people, not
just the original questioner, if they take the time to read and explore a
little. It's certainly better than the alternatives of silence, either due
to indifference, a desire not to be abrupt, or simple burnout of saying the
same thing over and over again.
Many of us come to the newsgroups for instant gratification (or instant
enlightenment) - that hot project just can't wait, or we can't figure out a
problem and need it solved *now*, and we can't be bothered to look around
for an answer someone might just be able to hand over to us. I know, I've
done it myself. Well, you can't learn to play piano in a day either - it
takes time, study, and practice, even if you've got a natural talent for
playing by ear. And if you're already a piano player and your trying to
learn pipe organ (which, with all its stops, pedals, bells & whistles, and
differing implementations bears a fair resemblance to Perl!) you're going
to find it takes a little while to learn your new instrument. The
principles of the sheet music are the same, but getting them to become
music is a little different.
c.l.p.m has a lot of organ virtuosos - you shouldn't pester them if you
haven't read the manufacturers manual that came with your organ or you
don't know how to read sheet music. And no damn guitar questions here! If
you want to talk about guitars, flutes, or how to hook up your stereo there
are other groups for that sort of thing.
Enough rambling for a Saturday morning, might be time to put on some Bach
and see if I can find my asbestos suit ... :-)
-- Chris
________*________ Chris Barnabo, chris@spagnet.com
____________ \_______________/ www.spagnet.com
\__________/ / /
__\ \_______/ /__ "The heck with the Prime Directive,
\_______________/(- let's destroy something!"
------------------------------
Date: 12 Aug 2000 15:07:36 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Negativity in Newsgroup
Message-Id: <slrn8paq0o.cro.abigail@alexandra.foad.org>
DM (drawbridge@home.com) wrote on MMDXXXVII September MCMXCIII in
<URL:news:39947037.905C0883@home.com>:
`' Why are there so many negative remarks in this newsgroup?
To compensate for what's happening in alt.cuddle.
`' People come here with problems and people come here to help others.
`' Some questions may not exactly fit the mold, so then don't answer it.
`' Perl has so many uses that many of us peogrammers aren't sure where to
`' turn to look for answers. Some users won't know if a question was asked
`' before because someone else asked it in the past. Get real, there are
`' new Perl users everyday getting stuck on things you once got stuck on.
Get real yourself. Noone died from doing some trivial research. With Perl
comes a FAQ of questions asked before. It comes with a FAQ so that people
like you don't have to bother the rest of us with questions we've heard
a gazillion times before.
It also helps you, as the FAQ has been reviewed, while here you don't
know the godzillas from the gurus. Nor do you know when a guru is pulling
your leg. On top of that, reading the FAQ answers your questions better,
and makes that the gurus have more time for you if you really have a
new question.
`' No one knows EVERYTHING about this language. There is no Wise King
`' here. So thank you to all of the helpful ones on this group, and to all
`' of the netative unhelpful ones...go look at yourself in the mirror
`' because your ego is out of control.
Just because you don't know everything doesn't mean you have to ask
everything here. Do some work yourself instead of whining, you lazy twit.
Abigail
--
# Perl 5.6.0 broke this.
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
------------------------------
Date: Sat, 12 Aug 2000 16:04:59 GMT
From: "Ben Kennedy" <bkennedy99@home.com>
Subject: Re: Negativity in Newsgroup
Message-Id: <LAel5.97336$A%3.1306866@news1.rdc2.pa.home.com>
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:3994F414.8610BCEC@stomp.stomp.tokyo...
> So, there you have it folks. A classic example of
> distasteful deceit, rancid hypocrisy and vile hatred
> so abundant here, provided by the man/woman of a
> thousand fake faces! So stereotypical, so expected,
> so repugnant and so representative of people here,
> save for those few good people here without enough
> good sense to get out of here, much like myself.
I bet I'm wasting my time again, but I have 15 minutes before lunch -
I don't hate you. I don't even dislike you. All I have said about you is
that you think you are Perl expert, but you are not. Thats it. I have
taken every opportunity to get your point of view of all things Perl, but
you steadfastly refuse to engage in any discussion. Rather you usually
attack anyone who disagrees whith what you have to say, like you did just
now. You have never used or demonstrated any knowledge of advanced Perl
issues, including but not limited to variable scope, references, eval,
closures, modular programming, or internals. This is why I can't consider
you an expert.
Where is the "vile hatred" you profess I have for you? I'm getting pretty
tired of extending the olive branch only to have you bite at my hand. If
you want to call a truce and actually communicate, my email address is
bkennedy99@home.com - I think I can pretty quickly get to the source of the
discontent.
If you do not wish to have a discussion and wish to respond to this message
by snipping my entire post and attacking me again, then let it be a message
to anyone who reads this newsgroup that you post only for the sake of
flaming. I have publicly extended an invitation for communication. What
more could you possibly want? This is an opportunity for everyone to start
over.
--Ben Kennedy
------------------------------
Date: Sat, 12 Aug 2000 09:12:40 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Negativity in Newsgroup
Message-Id: <39957778.63C4680E@stomp.stomp.tokyo>
Ben Kennedy wrote:
> Godzilla! spoke with a candid voice:
> I bet I'm wasting my time again, but I have 15 minutes before lunch -
Frank, would you like some cheese with your whine?
Godzilla!
------------------------------
Date: Sat, 12 Aug 2000 16:34:29 GMT
From: "Ben Kennedy" <bkennedy99@home.com>
Subject: Re: Negativity in Newsgroup
Message-Id: <p0fl5.97421$A%3.1307483@news1.rdc2.pa.home.com>
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:39957778.63C4680E@stomp.stomp.tokyo...
> Ben Kennedy wrote:
>
> > Godzilla! spoke with a candid voice:
>
> > I bet I'm wasting my time again, but I have 15 minutes before lunch -
>
> Frank, would you like some cheese with your whine?
>
> Godzilla!
Wow, you didn't even read my post. I'm sorry you had to prove me right.
--Ben Kennedy
------------------------------
Date: Sat, 12 Aug 2000 09:52:55 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Negativity in Newsgroup
Message-Id: <399580E7.60F6CB50@stomp.stomp.tokyo>
Ben Kennedy wrote:
> Godzilla! spoke with a voice of clarity:
> > Ben Kennedy told some lies and slung personal insults:
> > > Godzilla! spoke with a candid voice:
> > > I bet I'm wasting my time again, but I have 15 minutes before lunch -
> > Frank, would you like some cheese with your whine?
> Wow, you didn't even read my post.
How long have you been a practicing internet mind reader?
> I'm sorry you had to prove me right.
If I prove you anything, this will certainly
be something you will not enjoy.
You will do better to stick with your
habit of being a teller of lies and
slinger of personal insults. These
are events I usually give little
attention, deeming them most
unworthy of response.
Godzilla!
------------------------------
Date: 12 Aug 2000 18:10:05 +0100
From: kevin+usenet@suberic.net
Subject: Re: Negativity in Newsgroup
Message-Id: <8n40dd$d03$1@localhost.ie.suberic.net>
In article <LAel5.97336$A%3.1306866@news1.rdc2.pa.home.com>,
Ben Kennedy <bkennedy99@home.com> wrote:
>I bet I'm wasting my time again, but I have 15 minutes before lunch -
you are. i've only read this newsgroup for a few days and it's rather
clear that godzilla is a troll. by her posting quantity, quality
and length it's rather obvious that she's a person who spends large
amounts of time in front of the computer with nothing better to do
then submit useless posts to at least one newsgroup. my news spool
is one day old and i see the following in the 45 articles from her:
wc -l `grep -l '^From.*stomp.stomp.tokyo' *`
[...]
2610 total
of which 1428 lines don't start with > or contain a :. they're all
posted from corp.supernews.com and all have an X-Complaints-To header
(newsabuse@supernews.com).
so think about it, somewhere there's this person sitting in front of their
computer and constantly looking for newsgroups to post up crap that they
know isn't wanted or in anyway contructive or creative. this is just
one newgroups, who knows where else this person spews their crap.
i've wasted about five minutes now with the hope of getting the
following points across:
1) don't respond to godzilla. put her ih your killfile and leave
it at that. perhaps a few people could put warning messages
in ther sig files to alert newbies.
2) don't get pissed at godzilla. 1428 lines of crap posted over
three days. that's just sad.
3) i repeat: don't feed the trolls.
think of her as one of those annoying little dogs that runs barking to
the fence, slams into it, runs back and then repeats over and over.
you point and laugh at it, but you don't engage in conversations
with it!
kevin
--
kevin@suberic.net moo
fork()'ed on 37058400 moo
meatspace place: home http://suberic.net/~kevin/ yank? www.votenader.com
>>protect privacy: www.gnupg.org or www.pgp.com. encrypted mail preferred<<
------------------------------
Date: Sat, 12 Aug 2000 17:08:55 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Negativity in Newsgroup
Message-Id: <399d7c88.12303150@news.newsguy.com>
stevel@bluetuna.com (Steve Leibel) wrote:
>I think the "experts" who dominate this newsgroup have a legitimate
>complaint in that they are tired of questions about Unix, CGIs, and other
>topics that don't specifically relate to Perl. But the "read the
>FAQ-itis" is really out of control around here. I recently posted a very
>simple question and got the standard "perldoc something" and of course the
>doc was long, and did not answer the question. And the respondent was one
>of the most respected people around here.
I don't know what post you're referring to, but if that
happened, it's what's called a mistake -- even gurus make them
from time to time. I'd hardly call it typical. The vast
majority of "perldoc foo" responses are directly relevant to the
poster's question -- or as relevant as possible, considering the
vagueness of many of the questions.
>Of all the technical newsgroups and mailing lists I subscribe to, this one
>is by far the grumpiest.
Perhaps because it gets more questions that are off topic or can
be answered easily by reading the FAQ?
I've certainly seen this same discussion occurring in other
newsgroups over the years. Someone barges in and proceeds to
lecture the regulars about how rude they're being to newbies who
behave badly. I doubt that Miss Manners would approve of such
lectures.
It is not rude to tell someone to read the FAQ. The answers in
the FAQ are much better written than the average response a
poster is likely to get, and getting the answer from the FAQ is
certainly a lot faster. People have gone to great trouble to
write and compile the FAQ and documentation, and it's rude to
reject the resources that they've provided. And no would-be
programmer is going to get very far without learning to read the
documentation.
It is rude to attempt to participate in a community without
bothering to learn anything about its customs. Doing that in
face-to-face communities can get you a lot worse than an "RTFM".
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Sat, 12 Aug 2000 15:43:17 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: Newbie: can't run my test script at my Web Host
Message-Id: <pgel5.105$DT4.3373671@nnrp2.clara.net>
In article <sp6lopdjn4t112@corp.supernews.com>, Guillaume <guillaume.lahitette@cwusa.com> wrote:
>My Web Host created a cgi-bin directory for me. I uploaded my dummy test.pl
>(see code below) to make sure it has been created properly. I have tried a
>couple of Perl invocations but Netscape 4.7 still returns an HTTP Error 404
>Not Found when I can see test.pl using my WS_FTP client!
404 Means the web server didn't find the file. You should look at the error
log for the server to find out what file the server tried to access.
/cgi-bin/ will probably be aliased to something, you might have rewrite
rules on or whatever. Just because you see the file via FTP doesn't mean
that the webserver sees it in anywhere near the same place. Your /cgi-bin/
sub directory could be a symlink to a NFS mount and all requests for
/cgi-bin/ are resent to the webserver from which this disk is mounted
because it is highly optimised for executing CGI scripts whereas the one
your requests go to is optomised for reading and writing files ...
What you see and what is can be different.
(What is The Matrix?:)
>I posted a readme.txt file in the cgi-bin and I can access the page fine.
>Is there something wrong with my script?
There's something wrong your cgi-bin configuration. It is bad to be able to
read files in the cgi-bin, the server should interpret all requests for
files in there as requests to execute the file, it should never serve it to
an end user, otherwise it might end up sending out your perl script rather
than executing it, neatly displaying your code, database passwords and all
.. (and no, you can't make the source code unreadable, as I'm sure you
noticed in the FAQ's) Tell your ISP to get off their lazy arses and
configure it properly.
>According to netcraft.com, my web host is running Microsoft-IIS/4.0 on NT4
>or Windows 98.
[no comment] :)
>#!/usr/bin/perl.exe -w
This is almost certainly incorrect. If you are running on NT then it would
be something like d:\perl\bin\perl.exe -w (but check with your ISP), if its
UNIX, then the .exe extension would be highly unlikely (though possible for
the windows users out there) I think the perl interpreter can handle
any directory separators and converting as needed, but then it probably
doesn't care what your first line reads because I think NT will just be
using an association for .pl files to=> perl.exe "%1"
Col.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Sat, 12 Aug 2000 14:01:05 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: open, close dial-up connexion under Win32
Message-Id: <399590E1.DEBA4524@patriot.net>
Win23::DUN
http://base.dux.ru/guest/fno/perl/
Gorbeast wrote:
> Hello,
>
> Does any body know if I can open and close dial-up connections using
> perl
> scripts on my Windows98 computer? If so, do you have any details?
>
> Thank you for your time!
------------------------------
Date: Sat, 12 Aug 2000 14:32:15 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Perl code for a newbie!!
Message-Id: <39975e65.4586589@news.newsguy.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
>Larry Rosler wrote:
>
>>> delete ($file[$linenum]);
>>
>>It took half a dozen subsequent posts before this blatant error was
>>revealed.
>
>Have you seen the quote from perlfunc posted by Abe Timmerman?
>Apparently, those Perl implementing geeks keep adding new stuf, and
>aren't telling anyone.
I'm glad I wasn't the only one bitten by that. I still think
that giving bleeding-edge code to a newbie is cruel, especially
when there's a simple alternative -- splice() -- that's likely
to actually work on the newbie's system. Perl 5.6 is still new,
and code that requires it should be clearly indicated.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 12 Aug 2000 13:55:13 GMT
From: abigail@foad.org (Abigail)
Subject: Re: perl program running with cgi extension
Message-Id: <slrn8palp2.cro.abigail@alexandra.foad.org>
John P. Crisci (jpcrisci@mailnwql.cr.usgs.gov) wrote on MMDXXXIV
September MCMXCIII in <URL:news:398F8512.52C6AF93@mailnwql.cr.usgs.gov>:
$$ I have perl installed on a windows nt4.0. - using ActiveState. The cgi
$$ program extension is associated with perl. The program works fine from
$$ the command line and Internet Explorer. When I try to run it using
$$ Netscape 4.x I get the pop-up window that asks if I want to save the
$$ file to disk or run it from where it is at.
$$
$$ Does anyone know what settings Netscape might need to run this perl app?
Netscape doesn't run the application. Your server does. I very much
doubt your program produces the correct output from the command line.
I bet it has a bug which you won't notice when running IE cause that
has a well known bug as well.
However, this has nothing, absolutely nothing to do with Perl.
Go ask around the corner, in a more appropriate group.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: 12 Aug 2000 13:58:04 GMT
From: abigail@foad.org (Abigail)
Subject: Re: perl program running with cgi extension
Message-Id: <slrn8palue.cro.abigail@alexandra.foad.org>
DM (drawbridge@home.com) wrote on MMDXXXVII September MCMXCIII in
<URL:news:39944440.3DA90CEB@home.com> using Jeopardy style:
&&
&& If you want to get into what does and doesn't belong on this discussion
&& group, I suggest starting with getting on peoples case as ones to
&& remove. Good luck.
*Plonk*, you are removed.
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
------------------------------
Date: Sat, 12 Aug 2000 15:38:05 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: perl script
Message-Id: <399b6e34.8635042@news.newsguy.com>
inwap@best.com (Joe Smith) wrote:
> $search = "adp-ribosylation|complement|coagulation|necrosis|insulin";
> open(IN,"test.txt") or die "open(test.txt): $!\n";
> @matches = grep /$search/,<IN>;
> print "Found ",scalar(@matches)," matches.\n",@matches;
If the file is large, you may not want to read it all into
memory. It's easy enough to process it line by line. After
opening as above, do this (untested):
my $matches;
while (<IN>) {
next unless /$search/o;
++$matches;
print;
}
print "Found $matches matches\n";
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Sat, 12 Aug 2000 14:09:39 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: Pipe on WinNT
Message-Id: <399592E3.589E8B16@patriot.net>
Perhaps Dave Roth's Win32::Pipe will help. Here is an example of a
script (a couple
of scripts, actually) that use Win32::Pipe to communicate:
http://patriot.net/~carvdawg/perl.html
You want the file called "listen.zip"
Peter Gunreben wrote:
> Good comment :-|
>
> I like Linux but in this case I have no choice.
>
> Is there any other way to start a 2nd script
> and to bind it's output to a filehandle such that
> I can use the select procedure?
> What is really important is that the 1st script must
> not stop while the 2nd script is running. The output
> of the 2nd script shall be read by the 1st script at
> the latest when the 2nd exits.
>
> Any Idea?
>
> "Christopher M. Jones" wrote:
> >
> > My first instinct would be to say install Linux.
> >
> > ;)
------------------------------
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 3997
**************************************