[9775] in Perl-Users-Digest
Perl-Users Digest, Issue: 3368 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 5 15:27:24 1998
Date: Wed, 5 Aug 98 12:00:26 -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 Wed, 5 Aug 1998 Volume: 8 Number: 3368
Today's topics:
Re: - How Do I Open a file to Write from an https:// Se <rootbeer@teleport.com>
-- Can Multiple ACTIONS be called from one POST? <kamenar@yeahright.net>
-- Can One Perl Script call another one? <kamenar@yeahright.net>
Re: -- Can One Perl Script call another one? <rootbeer@teleport.com>
Re: -- Can One Perl Script call another one? (brian d foy)
ActivePerl PPM.PL & Firewalls <pep_mico@hp.com>
Re: And sometimes the FAQ's suck (Albert W. Dorrington)
Re: can't serve image from Perl + NT + IIS <rootbeer@teleport.com>
Re: comp.lang.perl.announce redux (Abigail)
Re: diff-like utility in Perl? (Greg Bacon)
Re: E-mail (Steve Linberg)
Re: fork strangeness (M.J.T. Guy)
Getting Perl Dial Modems jerry@yakima.net
Re: help me cgi (Abigail)
Help. How to get perl to run program in Nt nhu@ug.cs.dal.ca
Re: hiding user input (Greg Bacon)
Re: hiding user input (Abigail)
Re: hiding user input <johnc@interactive.ibm.com>
Re: How to delete the last column (Albert W. Dorrington)
Re: How to Overcome Module Name Changes (Steve Linberg)
Re: How to Overcome Module Name Changes <rootbeer@teleport.com>
Re: How to Overcome Module Name Changes <rootbeer@teleport.com>
Re: HTPASSWD / HTACCESS (Steve Linberg)
Re: HTPASSWD / HTACCESS (brian d foy)
IPC semaphores in Perl under FreeBSD <kulakov@kulakov.msk.ru>
Newbie: Objects (Matt Knecht)
PERL dialing a Modem zolan@my-dejanews.com
Re: PERL dialing a Modem <rootbeer@teleport.com>
Perl guru FAR *PLEASE MAKE SURE YOU READ* <sp@m.block>
Re: perl5 bug? <dan@dont.spam.me.please.missionrec.com>
Re: perlfaq - frequently asked questions about Perl (pa <jdporter@min.net>
Re: perlfaq - frequently asked questions about Perl (pa (Greg Bacon)
Re: perlfaq - frequently asked questions about Perl (pa (brian d foy)
Re: perlfaq - frequently asked questions about Perl (pa no.unsoliciteds@dead.end.com
Q: perl port for epoc/psion5 pda <thomas@x-berg.in-berlin.de>
Setting $ENV{LD_LIBRARY_PATH} doesn't work (Todd Hivnor)
Re: Setting $ENV{LD_LIBRARY_PATH} doesn't work <rootbeer@teleport.com>
simple regexp <rasan@horizonlive.com>
Re: split & empty patterns <rootbeer@teleport.com>
Re: Suggestion: file handle associated $\ <jdporter@min.net>
Variable Length & Memory? nanobreath@my-dejanews.com
Re: Variable Length & Memory? (Michael J Gebis)
Re: WIN32::ODBC problem (Steve Linberg)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 05 Aug 1998 18:35:37 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: - How Do I Open a file to Write from an https:// Server?
Message-Id: <Pine.GSO.4.02.9808051133410.14291-100000@user2.teleport.com>
On Tue, 4 Aug 1998, Webcruiser wrote:
> The program needs to open a file for output on the webcruiser.com
> directory. It can not do it.
It's not likely that this is a Perl problem; it sounds as if you'd have
the same difficulty if your program were written in any other language.
The docs, FAQs, and newsgroups about your server, CGI scripting, and
related issues should be helpful for you. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 04 Aug 1998 14:22:31 -0400
From: Webcruiser <kamenar@yeahright.net>
Subject: -- Can Multiple ACTIONS be called from one POST?
Message-Id: <35C75167.6464@yeahright.net>
On a submit, can I call two different cgi scripts from one submit
action? If so, how?
------------------------------
Date: Tue, 04 Aug 1998 14:21:27 -0400
From: Webcruiser <kamenar@yeahright.net>
Subject: -- Can One Perl Script call another one?
Message-Id: <35C75127.F1B@yeahright.net>
I have a cgi script running from a secure server. I need to call a cgi
script from a different server. How do I do this?
------------------------------
Date: Wed, 05 Aug 1998 18:51:06 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: -- Can One Perl Script call another one?
Message-Id: <Pine.GSO.4.02.9808051150410.14291-100000@user2.teleport.com>
On Tue, 4 Aug 1998, Webcruiser wrote:
> I have a cgi script running from a secure server. I need to call a cgi
> script from a different server. How do I do this?
Use the LWP module, if the first program is written in Perl. Hope this
helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 05 Aug 1998 15:01:22 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: -- Can One Perl Script call another one?
Message-Id: <comdog-ya02408000R0508981501220001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35C75127.F1B@yeahright.net>, Webcruiser <kamenar@yeahright.net> posted:
>I have a cgi script running from a secure server. I need to call a cgi
>script from a different server. How do I do this?
In article <Pine.GSO.4.02.9808051133410.14291-100000@user2.teleport.com>, Tom Phoenix <rootbeer@teleport.com> posted:
>It's not likely that this is a Perl problem; it sounds as if you'd have
>the same difficulty if your program were written in any other language.
>The docs, FAQs, and newsgroups about your server, CGI scripting, and
>related issues should be helpful for you. Good luck!
it seems easier to steal from Tom to answer this question, especially
since this is the same answer he gave to you when you asked before.
the answers don't change no matter how many times you ask.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
use LWP; #Luke!
------------------------------
Date: Wed, 05 Aug 1998 19:05:11 +0200
From: Pep Mico <pep_mico@hp.com>
Subject: ActivePerl PPM.PL & Firewalls
Message-Id: <35C890C7.2035A3BC@hp.com>
Hi
I just installed ActivePerl 5.005 from Activestate and it doesn't
include by default many packages. Like Win32:Ole that I need and many
others.
Now packages should be installed using a ppm.pl Script. This script
tries to connecto to www.activestate.com/packages to download it.
My problem is that my network is behind a Firewall, and I can't stablish
direct connections to internet.
How can I download and install these additional packages on my computer.
Any alternative to ActivePerl?
Thanks in Advance
pep_mico@hp.com
------------------------------
Date: 5 Aug 1998 12:29:32 -0500
From: awdorrin@mail.delcoelect.com (Albert W. Dorrington)
Subject: Re: And sometimes the FAQ's suck
Message-Id: <6qa4ps$3ft@ws051eng.ictest.delcoelect.com>
In article <6q81j2$6k6$1@client3.news.psi.net>, abigail@fnx.com (Abigail) writes:
:> Albert W. Dorrington (awdorrin@mail.delcoelect.com) wrote on MDCCXCIX
:> September MCMXCIII in <URL: news:6q7s1n$25e@ws051eng.ictest.delcoelect.com>:
:> ++
:> ++
:> ++ As for all the moaning and groaning - I have yet to see
:> ++ anyone post a pointer to the FAQ on comp.lang.perl.misc.
:>
:> Searching for "~g comp.lang.perl.misc & ~s FAQ" in dejanews gave me
:> at least 9 pointers to the FAQ on the first 20 hits.
:>
<snip>
I stand corrected - looks like my newsreader has been kind enough
to filter out crossposted messages from other newsgroups, which
explains why I haven't seen these messages.
:>
:> ++ Yes, I do know that Tom Phoenix posts them to
:> ++ comp.lang.perl.announce but not all sites receive that newsgroup
:> ++ and not all newbie even know what an FAQ is.
:>
:> Tom's weekly postings are crossposted to comp.lang.perl.misc and to
:> news.answers, so your argument doesn't hold. Furthermore, gnat posts
:> his pointer twice a week.
<see above.
:> I'm sorry, but if you manage to miss the pointers to the faq that are
:> posted here THREE TIMES A WEEK, you don't have any business on Usenet.
Hmm, on average there are 4-500 messages posted - per day - on
c.l.p.m, that works out to approx 3500 messages per week.
So if a users misses .085 % of the notes, they don't have any
business on Usenet - interesting rationale, not very logical, but
interesting.
I really don't want to get into a long drawn out flame war, as
I have nothing personally against you Abigail.
Just count me as another person who doesn't care for the
condecending, snobish, holier-than-thou attitudes of some
of the supposed 'experts' on this list.
- Al
--
Al Dorrington
FIRMS & Web Admin, Oracle DBA Phone: 765-451-9655
IC-DELCO CIM, Delphi Delco Electronics Systems Fax: 765-451-8230
------------------------------
Date: Wed, 05 Aug 1998 18:38:36 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: can't serve image from Perl + NT + IIS
Message-Id: <Pine.GSO.4.02.9808051137050.14291-100000@user2.teleport.com>
On Wed, 5 Aug 1998 casperbc@hotmail.com wrote:
> I'm having trouble getting Perl to serve an image.
If you're following the proper protocol but some browser or server doesn't
cooperate, then it's the other program's fault. If you're not following
the protocol, then it's your fault. If you aren't sure about the protocol,
you should read the protocol specification. If you've read it and you're
still not sure, you should ask in a newsgroup about the protocol.
> binmode ($image);
> binmode (STDOUT);
> if (open (IMG, "<" . $image)) {
Maybe you should read about binmode again. I don't think that you're using
it right.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 5 Aug 1998 17:57:49 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6qa6et$hhf$1@client3.news.psi.net>
Randal Schwartz (merlyn@stonehenge.com) wrote on MDCCC September MCMXCIII
in <URL: news:8chfzrfpj6.fsf@gadget.cscaper.com>:
++
++
++ The English thing was snuck in there just to solve the problem that
++ I've noted over three years. About once every six months, I recieve a
++ non-english posting. I can't read it, so I can't tell whether it's
++ on-charter or not. I write back (in English) to say "hey, CLPA gets
++ worldwide distribution -- could you rewrite that in English so more
++ people can read it?" and I either get a new English posting, or
++ nothing.
And how many people read it when you get nothing and you don't approve
the original posting? A whole lot less than a posting in a non-English
language would have had.
Are 2 non-English postings a year such a big deal?
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: 5 Aug 1998 17:57:10 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: diff-like utility in Perl?
Message-Id: <6qa6dm$uk$2@info.uah.edu>
In article <35d07ba4.130731823@nntpd.databasix.com>,
gburnore@databasix.com (Gary L. Burnore) writes:
: A very good way to answer the question. Rather than being a total UNIX
: and realizing that there are other operating systems out there that the
: programmer may have no decision in the purchace of.
It's illegal to compel someone to purchase Linux or FreeBSD.
Greg
------------------------------
Date: Wed, 05 Aug 1998 13:14:26 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: E-mail
Message-Id: <linberg-0508981314260001@projdirc.literacy.upenn.edu>
In article <elektrobank-0508981235370001@129.10.172.122>,
elektrobank@mailexcite.com wrote:
> Is there a way to check an e-mail account from a perl script?
You mean check if an email address is valid? No. See the FAQ.
If you mean to write a perl script to check your email, yes. Perhaps.
Depending on your OS. You'll have to write code to talk to your mail
server.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 5 Aug 1998 18:17:00 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: fork strangeness
Message-Id: <6qa7is$80c$1@pegasus.csx.cam.ac.uk>
Ian Goodacre <goodaci@mbs.gov.on.ca> wrote:
>I am running perl5.00404 on Digital Unix 4.0b and the strangest thing is
>happening:
>
> [ snip example and output showing repeated reading of input ]
>
>It's probably something silly, but I can't see what the problem is. I
>expect the program to read each line in the input file once only. Why
>does it keep jumping back to the second line?
Just by chance, I found the answer to this in a discussion about an
unrelated fork problem on perl5-porters.
>From the Solaris 2.5 man page for fflush()
If stream
is open for reading, the underlying file pointer is not
already at end of file, and the file is one capable of seek-
ing, the file pointer is adjusted so that the next operation
on the open file pointer deals with the byte after the last
one read from or written to the stream.
When the child process does an exit(), all streams are flushed. This
causes the rewinding that you see.
This only seems to happen on some platforms. The SunOS 4.1.3 man page
has similar wording. But it's gone completely from the Solaris 2.6
man page, which suggests someone somewhere thought it was a bug.
(Dunno whether its gone from the code, tho' - must try it.)
It would be interesting to know which platforms are / are not afflicted.
And it would seem the only workround is "Avoid having part-read input
handles around when doing fork." Or something.
Mike Guy
------------------------------
Date: Wed, 05 Aug 1998 18:17:05 GMT
From: jerry@yakima.net
Subject: Getting Perl Dial Modems
Message-Id: <6qa7j1$krg$1@nnrp1.dejanews.com>
I'm sorry if my previous post made it.
I am nearly finished with a program I'm writing, however I need to make a sub
that dials a modem in order to call my pager and leave a number. I however
have seen 3 different ways to do it on the web and so far have not been
successful. If anyone has a verified working script, or if anyone has any
pointers for me I would be very thankful.
Thanx in advance.
Please respond via E-Mail = )
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 5 Aug 1998 16:55:51 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: help me cgi
Message-Id: <6qa2qn$ffi$57@client3.news.psi.net>
tom (manning@nospam.com.au) wrote on MDCCC September MCMXCIII in
<URL: news:35c83d6a.0@news1.idx.com.au>:
++
++ If im posting some thing to one of my scripts can I make it so the info goes
++ to the script and the browser is sent to a page of my choice
++ with out touching the script.
That's not a perl related question at all. Please post in a more
appropriate group. alt.nailpolish or so.
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
------------------------------
Date: Wed, 05 Aug 1998 17:18:11 GMT
From: nhu@ug.cs.dal.ca
Subject: Help. How to get perl to run program in Nt
Message-Id: <6qa44j$ej1$1@nnrp1.dejanews.com>
Help.
would anyone know how to make perl run dialup networking on NT and make it
dial automatically?
please leave a copy of your reply in my mailbox.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 5 Aug 1998 17:51:10 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: hiding user input
Message-Id: <6qa62e$uk$1@info.uah.edu>
In article <35c96c1a.126752653@nntpd.databasix.com>,
gburnore@databasix.com (Gary L. Burnore) writes:
: The poster at the beginning of this thread wasn't rude. Wasn't being a j
: Even looked in the FAQS but couldn't find what he wanted. Your argument
: invalid.
scanning the FAQ != reading the FAQ
Greg
------------------------------
Date: 5 Aug 1998 18:01:50 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: hiding user input
Message-Id: <6qa6me$hhf$2@client3.news.psi.net>
Greg Bacon (gbacon@cs.uah.edu) wrote on MDCCC September MCMXCIII in
<URL: news:6q9u5q$mk7$10@info.uah.edu>:
++ In article <35d28369.67175268@nntpd.databasix.com>,
++ gburnore@databasix.com (Gary L. Burnore) writes:
++ : Yep, chris. Ignore me. Continue to let people like Abigail shit on peop
++ : when someone says something about it, be sure to ignore them.
++
++ Why do your protests have to be public? Wouldn't a polite private
++ message to Abigail have suited your needs just as well? Does your
++ emailphobia prevent you from doing this?
I DO NOT WISH TO RECEIVE EMAIL FROM THINGS CALLED BURNORE.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
------------------------------
Date: Wed, 05 Aug 1998 14:08:30 +0000
From: John Call <johnc@interactive.ibm.com>
Subject: Re: hiding user input
Message-Id: <35C8674C.B93736CB@interactive.ibm.com>
> : In article <6h8cdr$nkk$1@info.uah.edu>,
> : gbacon@cs.uah.edu (Greg Bacon) writes:
> : > When the new group is in place, I promise never again to bitch about
> someone asking a FAQ on comp.lang.perl.misc. :-)
>
> To me, this thread isn't just about this group, rather newsgroups in
> general.
Greg, I hope you or no one else takes this personal but this is exactly why
I felt prompted to post my original three messages that started this mess.
We were told by you directly and some others directly and indirectly that
the bashing over FAQs would stop when .moderated came around. That was a
promise from you to us. Why the change of minds now? I hope this doesn't
come across sarcasticly but as a sincere question.
Also, if this isn't a thread about just this group but about newsgroups in
general then why are we (not just Greg but all of us) having it in here? My
answer to that is that I intended the original posts to be about just here.
The other groups I visit are so much better in atmosphere and I wanted to
get that kind of attitude in here.
As I stated before, there is a .moderated group now. If you don't want FAQs
then that is the place to be. I'm not asking anyone to leave but I am
asking (not telling) everyone to be a little more patient and
understanding.
Thank you all again for your time,
John Call
------------------------------
Date: 5 Aug 1998 12:53:37 -0500
From: awdorrin@mail.delcoelect.com (Albert W. Dorrington)
Subject: Re: How to delete the last column
Message-Id: <6qa671$3gf@ws051eng.ictest.delcoelect.com>
In article <6q8c05$slb$2@csnews.cs.colorado.edu>, Tom Christiansen <tchrist@mox.perl.com> writes:
:> [courtesy cc of this posting sent to cited author via email]
:>
:> In comp.lang.perl.misc, rafalk@bellatlantic.net writes:
:> :I'm having a very tough time trying to figure out a way to delete the
:> :last column from an HTML table. What I want to do is get rid of the
:> :last columnaltogether regardless if it's bland or there's text in a
:> :cell.
:>
:> I'm sure there must be Perl content in this message, since you posted
:> it to a perl newsgroup, but I for one certainly can't see it.
:> And how do you judge that a field is boring, anyway?
:>
:> --tom
:> --
I think a resonably intelligent person could asertain that
the original poster was wondering how would you write a perl
script to parse an HTML table and delete the last column.
Personally, if I only had a few of these files to do and
the tables weren't huge - I'd do it by hand with my
favorite text editor, or perhaps pull the document into
an html editor such as Netscape Page Composer or
Symantec's Visual Page.
If I had bunches of html documents I needed to do this to,
or wanted a way to automate it, there is probably a way
to do this in Perl.
You could probably code something yourself from scratch
which would scan the html file, parse the table tags and
push the contents into a 2 dimensional array, delete
the appropriate cells from the array, and then re-write
the document. Sounds like a lot of work, also, it sounds
like something someone else may have done before.
So you might also be able to find something on CPAN
which can do some of these steps for you, such as the
HTML::Parser Module or the libwww bundle.
Check out:
http://www.perl.com/CPAN-local/CPAN.html#www
Hopefully this response is a bit more helpful.
"If you don't have anything nice to say, don't say anything at all."
--
Al Dorrington
FIRMS & Web Admin, Oracle DBA Phone: 765-451-9655
IC-DELCO CIM, Delphi Delco Electronics Systems Fax: 765-451-8230
------------------------------
Date: Wed, 05 Aug 1998 13:25:17 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: How to Overcome Module Name Changes
Message-Id: <linberg-0508981325170001@projdirc.literacy.upenn.edu>
In article <6q9oo7$1v9$1@news.ml.com>, edwarton@ml.com (Tony Edwardson
X7587) wrote:
> Anyone know a good way to cater for module name changes across releases?
>
> Specifically Date::DateCalc has been renamed Date::Calc in 5.004 and
> we have a module (Gendate.pm) which 'use's it and loads of scripts which
> use Gendate.pm but use different versions of perl.
>
> So our module Gendate.pm needs a different 'use' line depending on which
> version of perl is in use by the calling script.
>
> use Date::DateCalc if $PERL_VERSION < 5.004;
> use Date::Calc if $PERL_VERSION >= 5.004;
>
> doesn't work because the 'use' declarations are processed before any if
> statements.
How about something like this:
#!/usr/bin/perl -w
BEGIN {
$lib = qq(
use Date::DateCalc if $PERL_VERSION < 5.004;
use Date::Calc if $PERL_VERSION >= 5.004;
);
}
use strict;
eval $main::lib;
(etc)
__END__
A quick test with using CGI.pm seemed to work in this manner. Don't know
if this will work for you. Any gurus want to comment on this method?
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 05 Aug 1998 18:23:58 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to Overcome Module Name Changes
Message-Id: <Pine.GSO.4.02.9808051123220.14291-100000@user2.teleport.com>
On Wed, 5 Aug 1998, Steve Linberg wrote:
> use Date::DateCalc if $PERL_VERSION < 5.004;
> use Date::Calc if $PERL_VERSION >= 5.004;
Nice try, but no. You'll want to re-write the use as a "smart" BEGIN
block. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 05 Aug 1998 18:25:08 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to Overcome Module Name Changes
Message-Id: <Pine.GSO.4.02.9808051124280.14291-100000@user2.teleport.com>
On 5 Aug 1998, Tony Edwardson X7587 wrote:
> use Date::DateCalc if $PERL_VERSION < 5.004;
> use Date::Calc if $PERL_VERSION >= 5.004;
Try re-writing the use statements as "smart" BEGIN blocks. You can find
the definition of use in perlfunc. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 05 Aug 1998 13:13:09 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: HTPASSWD / HTACCESS
Message-Id: <linberg-0508981313090001@projdirc.literacy.upenn.edu>
In article <35C88CC7.245D@beckerinc.com>, Greg Swank
<gswank@beckerinc.com> wrote:
> Second: Because I am new to Perl, I would really like to get my hands
> on a "dummy" book or something written by third parties to get
> me up to speed on this. Recommend..?
Perl isn't for dummies. "Learning Perl," published by O'Reilly, is my
vote for the best place to start.
The non-Perl issues you will have to take to an appropriate group. :)
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 05 Aug 1998 14:26:48 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: HTPASSWD / HTACCESS
Message-Id: <comdog-ya02408000R0508981426480001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35C88CC7.245D@beckerinc.com>, Greg Swank <gswank@beckerinc.com> posted:
>First: I got everything working on the password and my .htaccess file
> has multiple users in the "require user (userName)..
>
> I would like to be able to add new users and passwords without
> having to telnet in everytime. Is there a short routine that
> I can add or run that would "append" the htaccess file after
> adding the user name and password...?
well, depending on your server, you could (literal string ahead):
require valid-user
instead of listing each user in the htaccess file. see your server
docs for more details.
as for foolong with the htpasswd files, you might take a look at
the HTTPD::UserAdmin module which should make your life a lot
simpler. last time i checked it work with flat files and dbm, and
perhaps a few other things.
>Second: Because I am new to Perl, I would really like to get my hands
> on a "dummy" book or something written by third parties to get
> me up to speed on this. Recommend..?
third parties? the best book for learning Perl is
Learning Perl
Randal L. Schwartz & Tom Christiansen
ISBN 1-56592-284-0
<URL:http://www.oreilly.com>
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: 5 Aug 1998 22:48:33 +0400
From: "Vladimir I. Kulakov" <kulakov@kulakov.msk.ru>
Subject: IPC semaphores in Perl under FreeBSD
Message-Id: <AABIJorCR3@kulakov.msk.ru>
Keywords: semaphore, Perl, FreeBSD
Hi All!
Trying to use 'semget', 'semctl' and the like syscalls in Perl 5 for
FreeBSD 2.2.5 I've got the message "IPC system V is not supported
on this mashine" ;(
So, I've rebuilded the kernel, turning the "SEMAPHORES" option on,
but the problem is still the same ;(
Is there any way to make semaphores work right with Perl under FreeBSD?
------------------------------------------------------
Vladimir I. Kulakov http://www.kudesniki.ru/
Moscow, Russia 2:5020/469.27@fidonet.org
V.Kulakov@kudesniki.ru AKA 2:5020/779.27@fidonet.org
------------------------------
Date: Wed, 05 Aug 1998 18:17:40 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Newbie: Objects
Message-Id: <8l1y1.1328$NJ5.6013659@news2.voicenet.com>
I've gotten to the point where I'm sick and tired of pasting functions
around, or requiring a .pl file filled with functions. So, I'm
attempting to figure out how to handle objects in Perl.
I've hit a stumbling block pretty early on:
#!/usr/local/bin/perl
$a = TEST::new('Foo');
print 'a: ', ref $a, "\n";
$b = TEST->new('Foo');
print 'b: ', ref $b, "\n";
$c = new TEST ('Foo');
print 'c: ', ref $c, "\n";
$a->test;
print "\n";
$b->test;
print "\n";
$c->test;
package TEST;
sub new
{
my $this = shift;
my $class = ref($this) || $this;
my $arg = shift;
my $self = {
arg => $arg,
};
bless $self, $class;
return $self;
}
sub test
{
my $self = shift;
print "$self->{arg}\n";
}
__END__
After looking through perlbot and perlobj (To be honost, I haven't read
these as thoroughly as I should.), I'm not sure why I get:
a: Foo
b: TEST
c: TEST
Can't locate object method "test" via package "Foo" at ./tst line 12.
When I comment out the direct notation $a = TEST::new('Foo'); I get the
expected results. Why doesn't the direct notation work? What's going
on?
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: Wed, 05 Aug 1998 18:01:56 GMT
From: zolan@my-dejanews.com
Subject: PERL dialing a Modem
Message-Id: <6qa6mk$itb$1@nnrp1.dejanews.com>
I'm having problems writing to my modem via perl. I need a sub in my program
to dial my pager. If anyone has any insight into this could you please
E-Mail me? I would be very appreciative.
Thanx in advance.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 05 Aug 1998 18:41:24 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: PERL dialing a Modem
Message-Id: <Pine.GSO.4.02.9808051140590.14291-100000@user2.teleport.com>
On Wed, 5 Aug 1998 zolan@my-dejanews.com wrote:
> I'm having problems writing to my modem via perl.
Have you seen the FAQ's entry about serial ports? Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 06 Aug 1998 02:40:50 +0900
From: "B. Oiledanimalbyproducts" <sp@m.block>
Subject: Perl guru FAR *PLEASE MAKE SURE YOU READ*
Message-Id: <35C89924.29BD7861@dead.end.com>
Perl Frequently Abusive Replies 1
[1]Why aren't I a nice person when I reply "Are you blind, or just plain
stupid?" to somebody who hasn't got the minimal idea of what programming is about.
There are is one factor that you should always bear in mind:
*The documentation is crystal clear to you because you wrote it or were
involved with writing it.
Without the benefit of hindsight the documentation isn't always apparently
fitting. It is for this reason books didn't, and computers don't replace human
instructors. Humans can be more flexible at explaining situations than the
LITERAL STRINGS contained in books and the LIMITED VARIABLE input that
computers can supply.
[2]But if some piddly little web user posts asking for a free perl
script......
there is a common feature built into the HUMAN OS called IGNORE(). This
function can be defined in terms of the negation of THINKING ABOUT() so
!THINKING ABOUT() = IGNORE(). For variants see also the PIG HEADED() and
BLINKERED VISION() man pages.
[3]But it didn't use to be like this... once people were competent, they came
from universities and had degrees.......
The spread of the web has obviously had vast reaching effects. On the pro side
Perl as a language has a much wider audience of potential and established
programmers, thereby allowing you to feel more important about what you do.
The price of this though is having to see the Subject lines like "HELP NEWBIE"
or "COUNTER WANTED FAST" when you connect up to the news group, however
careful application of the IGNORE function can reduce the levels of stress
that any self respecting guru must cultivate
[4] I still don't get it - why do I have to be nice to idiots who just want to
waste my precious time
By not being polite you tend to parse input through the HATRED() subroutine.
The more persistently you aren't polite and respectful of your fellows the
more the parsed HATRED output is saved in the temporary file called RANCOUR
until you find yourself the ANTAGONISTIC LOOP where your every action
generates an increasingly large RANCOUR file and you will find your own HATRED
subroutine being flooded with input. In future versions of the Human OS there
are plans to apply BUFFERING to avoid these phenomena, however with the
current version the only way to avoid this phenomena is to be polite
------------------------------
Date: Wed, 05 Aug 1998 18:13:46 GMT
From: "Mission A/V" <dan@dont.spam.me.please.missionrec.com>
Subject: Re: perl5 bug?
Message-Id: <uh1y1.1444$1Z1.1659958@news3.atl.bellsouth.net>
Mark-Jason Dominus wrote in message <6qa0bq$lld$1@monet.op.net>...
>This is only one of several reasons why you should be putting the data
>into a hash, into several unrelated variables. Do this:
>
> $hash{$name} = $value;
>
>Then you have a hash that has all the input data in it.
Can I then use the $hash like I would an array?
If I used the above. then
$name="31";
$value = "No";
$hash{$name} =$value
would print No under the following?
print "$hash{$31}";
Thanks
Daniel
------------------------------
Date: Wed, 05 Aug 1998 13:31:29 -0400
From: John Porter <jdporter@min.net>
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <35C896F1.2F0A@min.net>
Peter A Fein wrote:
>
> WTF was that?!? Thanks, I've already got my own copy of the man
> pages.
Well you should have said something to Tom sooner.
He wouldn't have wasted all that bandwidth if he had known
that you already had the files.
--
John Porter
------------------------------
Date: 5 Aug 1998 17:59:50 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <6qa6im$uk$3@info.uah.edu>
In article <opgpvefv2eb.fsf@harper.uchicago.edu>,
Peter A Fein <p-fein@uchicago.edu> writes:
: WTF was that?!? Thanks, I've already got my own copy of the man
: pages.
Such is the cost of catering to the LCD. :-(
Greg
------------------------------
Date: Wed, 05 Aug 1998 14:15:37 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <comdog-ya02408000R0508981415370001@news.panix.com>
Keywords: from just another new york perl hacker
In article <opgpvefv2eb.fsf@harper.uchicago.edu>, Peter A Fein <p-fein@uchicago.edu> posted:
>WTF was that?!? Thanks, I've already got my own copy of the man
>pages.
they whine when you don't spoonfeed them and they whine when you
do. :(
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: Thu, 06 Aug 1998 03:40:48 +0900
From: no.unsoliciteds@dead.end.com
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <35C8A732.CBF97F95@dead.end.com>
Greg Bacon wrote:
> Such is the cost of catering to the LCD. :-(
Greg you learned the wrong language, try python it's not used on the web :)
------------------------------
Date: Wed, 05 Aug 1998 20:36:55 +0200
From: thomas osterried <thomas@x-berg.in-berlin.de>
Subject: Q: perl port for epoc/psion5 pda
Message-Id: <35C8A597.41C67EA6@x-berg.in-berlin.de>
i wonder if anybody is on porting -or has already done- perl in order to
make it run on epoc, the os of psion's pda's.
since epoc is a real-os, and psion5's hardware may offer enough memory
and speed, i'm quite optimistic :)
- thomas <thomas@x-berg.in-berlin.de>
------------------------------
Date: 5 Aug 1998 18:36:00 GMT
From: hivnor@shore.net (Todd Hivnor)
Subject: Setting $ENV{LD_LIBRARY_PATH} doesn't work
Message-Id: <6qa8mg$qsm@fridge.shore.net>
I'm using DBI and DBD::Oracle to access my Oracle
database. But this *is* a Perl question, not a DBI
question.
I get DynaLoader errors for the Oracle driver unless I set
LD_LIBRARY_PATH. But the bizzare thing is that I have to set
LD_LIBRARY_PATH in a csh script which spawns my Perl script.
I have tried setting the environment variable in my Perl script,
but this doesn't work. I have no idea why. The following code
fails under CGI and cron:
----------------------------------------------------
#!/home/pbarkan/perl/bin/perl -w
BEGIN {
$ENV{LD_LIBRARY_PATH} = '/usr/oracle/lib';
}
BEGIN {
use CGI::Carp qw(fatalsToBrowser);
use DBI;
use DBD::Oracle;
}
print "Content-type: text/plain\n\nSuccessful completion\n";
----------------------------------------------------
The error is:
Can't load '/home/pbarkan/perl/lib/site_perl/sun4-solaris/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: ld.so.1: /home/pbarkan/perl/bin/perl:
fatal: libsunmath.so.1: can't open file: errno=2
at /home/pbarkan/perl/lib/sun4-solaris/5.00404/DynaLoader.pm line 166.
at /home/http_80/cgi-bin/dbi.cgi line 10
----------------------------------------------------
This exact same script works if I call it from a
csh script which sets LD_LIBRARY_PATH:
----------------------------------------------------
#!/bin/csh
setenv LD_LIBRARY_PATH /user/oracle/lib
/home/pbarkan/perl/bin/perl /home/http_80/cgi-bin/$1 $2 $3 $4
----------------------------------------------------
I don't understand why setting LD_LIBRARY_PATH inside
Perl doesn't work. I've been very careful to set it inside
an early BEGIN block so it is set before the attempt
to use DBD::Oracle.
Any clues?
My environment: Solaris 2.5, Oracle 7.3, Perl 5.00404,
DBI 0.93, DBD:Oracle 0.48. Perl is installed into
/home/pbarkan/perl since that's where I have write
access. Oracle is maintained by ISP.
Todd Hivnor
hivnor at shore dot net
------------------------------
Date: Wed, 05 Aug 1998 18:53:17 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Setting $ENV{LD_LIBRARY_PATH} doesn't work
Message-Id: <Pine.GSO.4.02.9808051152010.14291-100000@user2.teleport.com>
On 5 Aug 1998, Todd Hivnor wrote:
> $ENV{LD_LIBRARY_PATH} = '/usr/oracle/lib';
> setenv LD_LIBRARY_PATH /user/oracle/lib
I see something different between those two strings. Surely it's not so
simple as this?
> hivnor at shore dot net
Thank you for not doing that in your headers. :-)
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 05 Aug 1998 14:54:16 -0400
From: Rasan Rasch <rasan@horizonlive.com>
Subject: simple regexp
Message-Id: <35C8AA58.17B573F6@horizonlive.com>
Can anyone tell me what is wrong with
@matches = /http.*(com|edu)/g;
in trying to extract a url from a line? All I can seem to fill @matches
with is the subdomain "edu."
------------------------------
Date: Wed, 05 Aug 1998 18:32:32 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: split & empty patterns
Message-Id: <Pine.GSO.4.02.9808051130470.14291-100000@user2.teleport.com>
On 5 Aug 1998, Niklas Matthies wrote:
> Subject: split & empty patterns
> From the perlop man page:
>
> If the PATTERN evaluates to a null string, the last
> successfully executed regular expression is used
> instead.
Of course, perlfunc's entry about split says something different about
what happens if the pattern used there is null. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 05 Aug 1998 13:51:17 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Suggestion: file handle associated $\
Message-Id: <35C89B95.469F@min.net>
> John Porter wrote:
>
> >so I think it would be trivial to simply modify (or derive from)
> >FileHandle, so that objects of that class maintain their own data
> >attributes for RS, ORS, and OFS, rather than using the perl special
> >globals for those purposes.
O.k, I admit, I was guessing. To do it this way would require
some knowledge of the inner workings of FileHandle, which I
don't want to go into. The TIEHANDLE approach sounds good.
(Same concept, different OO.)
--
John Porter
------------------------------
Date: Wed, 05 Aug 1998 17:13:26 GMT
From: nanobreath@my-dejanews.com
Subject: Variable Length & Memory?
Message-Id: <6qa3rn$duk$1@nnrp1.dejanews.com>
Hello... this question might be rooted in assumptions that are way off base...
if so, feel free to let me know. I guess this question could be in regards to
any programming language, but I'm thinking of it in regards to perl.
It is generally considered good practice to use long variable names so that
the code is more readable. My question is: does variable length ever become a
factor in memory allocation or program speed? As I think about it,
$db_file_marker seems like it would take up more space somewhere than $dbfm.
Perhaps I'm way off here, and I'm inclined to think I am, since I've never
heard any discussion of this before, just recommendations to use long
variable names.
If you could, please cc: any responses to my e-mail address. Thanks a lot!
--
nanobreath@my-dejanews.com
open source everything
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 5 Aug 1998 17:35:56 GMT
From: gebis@noble.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Variable Length & Memory?
Message-Id: <6qa55s$ieg@mozo.cc.purdue.edu>
nanobreath@my-dejanews.com writes:
}Hello... this question might be rooted in assumptions that are way off base...
}if so, feel free to let me know. I guess this question could be in regards to
}any programming language, but I'm thinking of it in regards to perl.
}It is generally considered good practice to use long variable names so that
}the code is more readable. My question is: does variable length ever become a
}factor in memory allocation or program speed? As I think about it,
}$db_file_marker seems like it would take up more space somewhere than $dbfm.
}Perhaps I'm way off here, and I'm inclined to think I am, since I've never
}heard any discussion of this before, just recommendations to use long
}variable names.
Hop on over to Fry's. Give them $15. Go home with 16 Megs of memory.
And then ask yourself, "Do I really care that $db_file_marker might
cost me .00095 cents more than $dbfm?"
If you don't use a pathologically bad case (I imagine some knucklehead
here posting a program that uses million character identifiers) any
difference in memory would fade into the background noise.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Wed, 05 Aug 1998 13:36:15 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: WIN32::ODBC problem
Message-Id: <linberg-0508981336150001@projdirc.literacy.upenn.edu>
In article <6prt89$kov$1@nnrp1.dejanews.com>, jckchan@hkstar.com wrote:
> Dear all
>
> Is http://www.roth.net down or closed???
>
> I've a problem to pass a variable in a Sql call such as:
>
> $db->Sql("select FirstName, LastName from Addresses where FirstName='$name'");
>
> It cannot get the value of $name, but it works in "insert". What is wrong???
How do you know it doesn't work? Are you retrieving rows and coming up
empty? You might want to construct your string ahead of time so you can
echo it in an html comment (for example) and see exactly what you're
asking for.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
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 3368
**************************************