[11098] in Perl-Users-Digest
Perl-Users Digest, Issue: 4698 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 20 11:03:53 1999
Date: Wed, 20 Jan 99 08:00:24 -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 Wed, 20 Jan 1999 Volume: 8 Number: 4698
Today's topics:
Re: "Back button" in CGI script (Steve Linberg)
Re: A question about pack function (Bart Lateur)
any program about information retrieval(IR) vegachen@www.pcmail.com.tw
Constants.pm in mod_perl <pepe@lexmedia.com.pl>
Re: Determining the OS... (Fluffy)
Difficult issues not suitable for this newsgroup? <richardsonja@logica.com>
Re: Difficult issues not suitable for this newsgroup? (Bart Lateur)
Re: Difficult issues not suitable for this newsgroup? <Arved_37@chebucto.ns.ca>
Re: Endian converter: Does anyone know of one? (Bart Lateur)
getpwnam - is there a Perl getspnam? <usenet-replies@rocketmail.com>
Help getting script going chall5@hotmail.com
Re: How to get IP address of a local machine under NT latsharj@my-dejanews.com
Re: How to get IP address of a local machine under NT droby@copyright.com
Re: Is there a way in perl for children to survive thei <richardsonja@logica.com>
Re: Is there a way to create self contained perl execut <Allan@due.net>
Re: Is there a way to create self contained perl execut <tchrist@mox.perl.com>
list of hashes <alex@kawo2.rwth-aachen.de>
Re: list of hashes <rick.delaney@home.com>
Re: Looking for free Web Server with CGI ruxfounder@my-dejanews.com
Re: Oracle connections. <xiehang@itc.com.cn>
Re: Perl Criticism (Richard Clamp)
Re: Perl Criticism (Bart Lateur)
Re: Perl Criticism droby@copyright.com
Re: Perl Criticism (Richard Clamp)
Re: Perl Criticism (I R A Aggie)
Re: Perl Password Hiding Challenge <richardsonja@logica.com>
Re: Perl problem :(Offline mode... <andrewf@beausys.demon.co.uk>
Re: problem with Data::Dumper <Arved_37@chebucto.ns.ca>
Re: problem with: use module; (Bart Lateur)
Re: problem with: use module; (Fluffy)
Re: protecting scripts <pdcawley@bofh.org.uk>
Re: Req: HTMl parser script/module <stephen@edtechnews.com>
Re: SHTML output? <KlausRusch@atmedia.net>
Re: Statistics for comp.lang.perl.misc (Bart Lateur)
Re: Statistics for comp.lang.perl.misc (Bart Lateur)
tty - question <dennis@bilbo.iok.net>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 20 Jan 1999 10:25:16 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: "Back button" in CGI script
Message-Id: <linberg-2001991025160001@ltl1.literacy.upenn.edu>
In article
<Pine.SOL.3.96.990119212810.17475A-100000@apocalypse.OCF.Berkeley.EDU>,
Katia Hayati <hayati@ocf.Berkeley.EDU> wrote:
> Well I am not an expert like Abigail, but it seems to me that if you use
> the environment variable $ENV{"HTTP_REFERER"} (sic), it will do the trick.
No, it won't. What do you think is in HTTP_REFERRER when a user chooses a
bookmark, or types in a URL by hand, or arrives via a hotlink from another
application? HTTP_REFERRER can be empty, and this is perfectly valid.
FU's set (again).
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
email: <linberg@literacy.upenn.edu>
WWW: <http://www.literacyonline.org>
------------------------------
Date: Wed, 20 Jan 1999 10:38:18 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: A question about pack function
Message-Id: <36a7b10f.10334413@news.skynet.be>
Mark Nold wrote:
>$decimal = pack('B8', '10110110');
>print $decimal, "\n";
It's not intuitive (to me), but $decimal now contains the byte you
packed, not the number. You could use unpack("c",$decimal) to get the
number itself (or use ord(), as already suggested). Similarily, you can
use unpack with one of "s","S","l","L","n","N","V","v" for 2-byte short
or 4-byte longs. See the docs on pack/unpack.
HTH,
Bart.
------------------------------
Date: Wed, 20 Jan 1999 12:41:58 GMT
From: vegachen@www.pcmail.com.tw
Subject: any program about information retrieval(IR)
Message-Id: <784iuk$30k$1@nnrp1.dejanews.com>
HI ALL: i am try to write a IR system in perl,so is there any person that
have ever write IR program? I need the TFIDF algorithm?(it is the clustering
method that determinate the weight of a word) thanks a lot:)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 20 Jan 1999 11:17:00 GMT
From: "Artur Pop3awski" <pepe@lexmedia.com.pl>
Subject: Constants.pm in mod_perl
Message-Id: <MWip2.2902$12.466059@news.tpnet.pl>
I have following problem:
platform: Win95/WinNT
server: Apache 1.3.3 + mod_per 1.16
perl: 5.004
Problem:
At the first sight everything seems to work fine. Quite large collection of
scripts, that used to work on some UNIX station with the same server and
module works quite well. But there is one problem: "system" and "exec"
commands. From the messages thrown by perl I've learned, that perl can't
find loadable module for Constants.pm. Analysis of DynLoader indicated that
expected name for the module is Constants.dll. Well, environment for
compiling such a module is included in distribution of mod_perl, but module
is not compiled from the main Makefile (running nmake on main Makefile does
not lead to any troubles), but attached as a separate directory. After
generating makefile (perl Makefile.PL) I have tried to run nmake on it and I
have got plenty of syntax error while compiling Constatnts.xs to
Constants.tc. Settings of paths for included files etc. seems to be OK.
Small hacks in the Makefiles and Constants.xs that I have made does not help
at all. So my question is if anybody met such a problem ? Is there any
simple solution ? Thanks for your help in advance !
Artur Poplawski
WP-PWN
pepe@lexmedia.com.pl
Cracow, Poland
------------------------------
Date: 20 Jan 1999 15:41:51 GMT
From: meowing@banet.net (Fluffy)
Subject: Re: Determining the OS...
Message-Id: <784tfo$73o@meow.invalid>
Andrew Fry <andrewf@beausys.demon.co.uk> wrote:
> Q1:
> What is the correct (OS-independent) way to determine the
> OS ... is it $^O ?
Maybe, it depends on how specific an answer you need. You may also
want to look into the Config module to get more detailed information
about the perl you are running.
--
"Meow." --me
------------------------------
Date: Wed, 20 Jan 1999 13:44:05 -0000
From: "James Richardson" <richardsonja@logica.com>
Subject: Difficult issues not suitable for this newsgroup?
Message-Id: <784mjo$m3g@romeo.logica.co.uk>
<BAD MOOD>
Why oh why is it that only simple questions seem to be asked / answered on
this newgroup? Innumerable questions about CGI, about paths, about any
number of things that are immediately knowable from the perl FAQ, or man
perlfunc, but no interest at all about a reasonably valid question on XS,
shame, I thought I might have contributed enough answers to this newsgroup
over the last couple of years to warrant one difficult question.
</BAD MOOD>
What do you think?
There are a number of contributors to this newsgroup that tirelessly repeat
answers to the same old same old questions, and all credit to them, for perl
should be encouraged. But people should also be encouraged to think for
themsleves before seeking help (aka ->result with others doing the work for
them!)
James
------------------------------
Date: Wed, 20 Jan 1999 13:54:33 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Difficult issues not suitable for this newsgroup?
Message-Id: <36a5dec7.284621@news.skynet.be>
James Richardson wrote:
>Why oh why is it that only simple questions seem to be asked / answered on
>this newgroup?
>shame, I thought I might have contributed enough answers to this newsgroup
>over the last couple of years to warrant one difficult question.
>What do you think?
If your question is Perl related and not a FAQ, you NEED NOT be a
regular poster to be allowed to ask it. No matter how difficult it is.
Many of the real Perl guru's are indeed on the newgroup. Maybe, if you
really want it to stand out, you can ask it in the moderated newsgroup.
>There are a number of contributors to this newsgroup that tirelessly repeat
>answers to the same old same old questions, and all credit to them, for perl
>should be encouraged. But people should also be encouraged to think for
>themsleves before seeking help (aka ->result with others doing the work for
>them!)
Aren't there enough flames already?
Those "helpful" people (a matter of opinion) are just trying to avoid
this newsgroup from looking like a bunch of grumpy bastards.
Bart.
------------------------------
Date: Wed, 20 Jan 1999 11:26:43 -0400
From: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: Difficult issues not suitable for this newsgroup?
Message-Id: <Pine.GSO.3.95.iB1.0.990120110938.1609A-100000@halifax.chebucto.ns.ca>
Hey, the XS questions get looked at. I know I check them out. I've even
answered a few. :-)
There's no bias in this NG against XS-related questions that I'm aware of,
but I would suggest trying the c.l.perl.modules NG for better results.
The thing about XS, also, is this: you'll get more help with it if you're
using standard mechanisms. Your previous post included code that shows
that you're handcoding right from scratch. This is all well and good, but
I look at something where you're not using xsubpp or SWIG, and my attitude
is sort of: learn from your mistakes - you invited them. I don't mean that
badly.
For what it's worth, you're trying something that I haven't, and ain't
likely to. I write extensions to be in their own namespace, not to add a
new function 'jimbo' to main:: So I'm not even going to offer any real
suggestions. :-) I'll add, however, that it's recommended to use the
PerlIO* functions, such as PerlIO_stdoutf, in place of stdio functions
like printf. And in any case, you didn't #include <stdio.h>.
If you're hell-bent on trying what you're trying, throw a MODULE and
PACKAGE statement in referencing main, and see what that does... :-) After
all, you praised experimentation...
On Wed, 20 Jan 1999, James Richardson wrote:
> <BAD MOOD>
> Why oh why is it that only simple questions seem to be asked / answered on
> this newgroup? Innumerable questions about CGI, about paths, about any
> number of things that are immediately knowable from the perl FAQ, or man
> perlfunc, but no interest at all about a reasonably valid question on XS,
> shame, I thought I might have contributed enough answers to this newsgroup
> over the last couple of years to warrant one difficult question.
> </BAD MOOD>
------------------------------
Date: Wed, 20 Jan 1999 15:18:25 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Endian converter: Does anyone know of one?
Message-Id: <36a5f13c.5005480@news.skynet.be>
>>Has anyone come across Perl code that can convert
>>binary files in Big-Endian format to little-Endian format ?
>
>Yes. See pack/unpack. "N" and "n" indicate Big Endian, long (4 bytes)
>and short (2 bytes) integer, respectively, "V" and "v" indicate Little
>Endian (long and short).
In addition, I'll tell you a little trick with how I delt with reading
TIFF file tags, in Perl.
TIFF files can have their data in either Big- or Little-Endian order.
You can determine which it is, by looking at the first two bytes of the
file: a Big-Endian TIFF file starts with "MM" (Motorola), a
Little-Endian one with "II" (Intel). So I used these values to set:
if ($marker eq 'MM') {
$long = 'N'; $short = 'n';
} elseif ($marker eq 'II') {
$long = 'V'; $short = 'v';
} else {
die "It's not a TIFF file!\n";
}
Now, you can unpack the data simply by
$length = unpack($long,$data);
or
$ratio = unpack("$long$long",$data);
which is self-documenting code.
Bart.
------------------------------
Date: Wed, 20 Jan 1999 10:51:53 -0500
From: Debbie Whitten <usenet-replies@rocketmail.com>
Subject: getpwnam - is there a Perl getspnam?
Message-Id: <36A5FB99.4B57C53D@rocketmail.com>
Hello,
I am trying to debug 2 socket programs. One program is running on an HP
machine. It happily runs getpwnam, and sends the password to a Sun
machine. When the Sun machine runs getpwnam, it returns an x, which is
(for me), wrong. I need it to search the /etc/shadow file instead of
/etc/passwd. Apparently, on a Sun, the passwords are set to 'x' in the
/etc/passwd file.
I tried the function getspnam, which exists in C, but apparently does
not in Perl. Is it in a different module? I was using User::pwent.
Any advice welcome!
Thanks,
Deb
------------------------------
Date: Wed, 20 Jan 1999 15:08:06 GMT
From: chall5@hotmail.com
Subject: Help getting script going
Message-Id: <784rgd$agn$1@nnrp1.dejanews.com>
After finally getting myself a CGI-BIN on a UNIX box I am having trouble
getting a Perl script to work and wondered if anyone could help me.
The script I am trying to make work is the simple database application
detailed at http://webreview.com/wr/pub/98/10/23/perl/database.html. I have
set the path to the perl interpreter correctly for my server
(#!/usr/local/bin/perl) at the beginning of the script, uploaded the .pl file
in ASCII, set the permissions, put the database.txt file in a separate dir
and have the config.txt file pointing at the database.txt file correctly (I
hope) so it can be written to. However I keep getting Internal Server Error
mesages. I have Telnetted in but I do not know how to run the .pl file from
the command line to get more feedback on the problem.
Please could someone give me some help either in this forum or on
chall5@hotmail.com ( I am new to CGI if you hadn't noticed ! )
Thanks
Chris
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 20 Jan 1999 13:08:18 GMT
From: latsharj@my-dejanews.com
Subject: Re: How to get IP address of a local machine under NT
Message-Id: <784kfs$4au$1@nnrp1.dejanews.com>
In article <783mlv$8n5$8@client2.news.psi.net>,
abigail@fnx.com wrote:
> ;; At the command prompt you shpuld be able to type
> ;;
> ;; ipconfig
>
> That's ifconfig. It gives me 127.0.0.1.
Er.. On my Win NT machine ifconfig gives:
The name specified is not recognized as an internal or external command,
operable program or batch file.
On the other hand, ipconfig gives:
Windows NT IP Configuration ...
> Of course, this doesn't have anything to do with Perl.
True.
Regards,
Dick
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 20 Jan 1999 13:33:56 GMT
From: droby@copyright.com
Subject: Re: How to get IP address of a local machine under NT
Message-Id: <784m05$u9h$1@nnrp2.dejanews.com>
In article <783mlv$8n5$8@client2.news.psi.net>,
abigail@fnx.com wrote:
> KernelKlink@webtv.net (KernelKlink@webtv.net) wrote on MCMLXVII September
> MCMXCIII in <URL:news:14993-36A4F973-1@newsd-101.iap.bryant.webtv.net>:
> ;; At the command prompt you shpuld be able to type
> ;;
> ;; ipconfig
>
> That's ifconfig. It gives me 127.0.0.1.
Actually, on NT, it's ipconfig.
>
> Of course, this doesn't have anything to do with Perl.
>
True enough. Except of course, as Jonathan Stowe already noted, you can get
it using Perl, as described in perlfaq9.
And, though the section on perlfaq9 ends with the caveat "(We still need a
good DNS domain name-learning method for non-Unix systems.)", the method
suggested therein works fine for NT as well. Maybe it doesn't work on some
other non-Unix systems.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 20 Jan 1999 15:29:31 -0000
From: "James Richardson" <richardsonja@logica.com>
Subject: Re: Is there a way in perl for children to survive their parent?
Message-Id: <784spg$omr@romeo.logica.co.uk>
Arne Jamtgaard wrote in message <36A50EF2.20DA@fc.hp.com>...
>If the answer is merely to have the parent wait until the
>child is done, I can do that. I'm hoping for some sort of
>NOHUP in perl. If there's a way to pull this off, I'd
>really appreciate a pointer towards where to look.
Not 100% sure, but for a 100% daemon process, try:
a. fork &exec your new program, then in this program:
1. Close files (stdin, stdout, stderr)
2. chdir(/)
3. umask(0)
4. SIGTTOU = SIG_IGN
5. setpgrp
6. setsid
James
------------------------------
Date: Wed, 20 Jan 1999 08:04:03 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: Is there a way to create self contained perl executable?
Message-Id: <784jst$lq2$1@camel15.mindspring.com>
neilpaku wrote in message <36A64630.60D9@paradise.net.nz>...
:Hi all,
: I couldn't find in the faqs a solution to my problem. I would like to
:create a script that also contained the perl interpreter so that I could
:place this script on any machine and run it without having to install
:perl. Is this possible? The intended platform is nt. If it is possible,
:where can I find examples?
:Thanks for your time,
: Neil.
WWW.perl2exe.com
HTH
AmD
------------------------------
Date: 20 Jan 1999 07:07:17 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Is there a way to create self contained perl executable?
Message-Id: <36a5e315@csnews>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, neilpaku@paradise.net.nz writes:
: I couldn't find in the faqs a solution to my problem. I would like to
:create a script that also contained the perl interpreter so that I could
:place this script on any machine and run it without having to install
:perl. Is this possible? The intended platform is nt. If it is possible,
Let's suppose that your script is 5k and the perl installation is
two megatabytes. If you give them both together, it costs 2.005
megabyte.s If you give them three such scripts, it's now going to
cost 6.015 megabytes. Do you see where this is going? It's a bad idea.
Just give them the script. If they want Perl, they know where to find it.
If they don't know where to find it, then their professional systems
admistrator will. If they don't have one of those, then shame on them --
computers are not toasters. But you could install Perl for them if and
only if Perl is not already installed. But this "bundle the interpreter
with the script" on disk every time is just plain dumb. Just say no.
You don't give a Macintosh application to someone without a Mac.
You don't give a Windows application to someone without Windows.
You don't give an X11 application to someone without X11. There just
is no good solution for giving perl things to people without perl --
other than giving them perl! This is so obvious that perhaps you've
missed it when it is staring you right there in the face.
--tom
PS: The cited perl2exe thingie ranges from remarkably stupid at its
best to a dangerous lie at its worst, depending on how it is
presented. Forget it.
--
pos += screamnext[pos] /* does this goof up anywhere? */
--Larry Wall, from util.c in the v5.0 perl distribution
------------------------------
Date: Wed, 20 Jan 1999 12:25:26 +0000
From: Alex Farber <alex@kawo2.rwth-aachen.de>
Subject: list of hashes
Message-Id: <36A5CB36.1F3A426C@kawo2.rwth-aachen.de>
Hi,
I have a question. Why doesn't it work to push()
a reference to a hash into a list, like this:
push @loh, $href;
Why do I have to do an extra anonymous hash:
push @loh, {%$href};
Thank you!
/Alex
--
http://www.simplex.ru/pref.html
------------------------------
Date: Wed, 20 Jan 1999 11:52:56 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: list of hashes
Message-Id: <36A5C56A.D7AD9BE6@home.com>
[posted & mailed]
Alex Farber wrote:
>
> Hi,
>
> I have a question. Why doesn't it work to push()
> a reference to a hash into a list, like this:
>
> push @loh, $href;
It does work.
>
> Why do I have to do an extra anonymous hash:
>
> push @loh, {%$href};
You don't.
Please post a small example of code that demonstrates why you think this
and someone should be able to answer your real question.
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Wed, 20 Jan 1999 11:01:06 GMT
From: ruxfounder@my-dejanews.com
Subject: Re: Looking for free Web Server with CGI
Message-Id: <784d1f$uej$1@nnrp1.dejanews.com>
In article <77utk0$7pq$1@nnrp1.dejanews.com>,
dave@mag-sol.com wrote:
> In article <36A0CF1E.74D1E596@hamptons.com>,
> Chris <chrisl@hamptons.com> wrote:
> > Hi
> >
> > Are there any free Web servers for Win98 (even trial versions) that
> > allow me to mess around with CGI & Perl? Last time I tried this (years
> > ago), PWS was supposed to do it but it was broken (or I was broken, or
> > something)
>
> Get Apache from <http://www.apache.org>
>
> --
> Dave Cross
> Magnum Solutions Ltd: <http://www.mag-sol.com/>
> London Perl M[ou]ngers: <http://london.pm.org/>
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
You can also use OMNIhttpd from http://www.omnicron.ad.ca/httpd/
For me it works under 95 with perl 5.005_02 compliled from source.
-Dima.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 20 Jan 1999 17:57:08 +0800
From: "Xiehang" <xiehang@itc.com.cn>
Subject: Re: Oracle connections.
Message-Id: <36a5a775.0@news.free4all.co.uk>
Maybe you should use DBI and DBD::Oracle or DBD::ODBC modules.
om7@cyberdude.com wrote in message <782cdh$669$1@nnrp1.dejanews.com>...
>I need to connect to an Oracle database using Perl, can someone tell me how
I
>can go about doing this? Are there any special modules/libraries available
>for this purpose?
>
>Any help would be appreciated.
>
>Thanks.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 20 Jan 1999 11:58:05 GMT
From: richardc@tw2.com (Richard Clamp)
Subject: Re: Perl Criticism
Message-Id: <36a5c1a2.6439582@news.highwayone.net>
On Wed, 20 Jan 1999 04:11:16 GMT, topmind@technologist.com wrote:
>I have no control of what other companies do. I only end up
>maintaining the code of cryptologists.
All that big prime stuff, very nice :)
>The problem can be compared to the situation with OS's like
>Windows 3.1 that assume and hope that applications cooperate and
>do not step on each other. Guess what, applications DO step
>on each other.
3.1 an OS? Okay, I won't go there, I'd lose you too easily.
>Self policing does not work and managers are not trained
>or have no incentive on weeding out the cryptologists in
>a good many cases.
Self policing works fine. With my management hat on I take offense
that you suggest I don't know how to manage programmers and
programming projects.
Please don't hi-jack 'cryptologists' to mean bad programmers.
Cryptology is a science which I have a great deal of respect for and
is not related to the symptom you ascribe Perl to be a cause of.
The world needs more cryptologists, bad programmers who produce
mangled code we can do without.
Richard
--
Richard Clamp richardc@tw2.com
Frisbeetarianism, n.:
The belief that when you die, your soul goes up on the roof and gets stuck
------------------------------
Date: Wed, 20 Jan 1999 13:57:55 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl Criticism
Message-Id: <36a6e0c7.796082@news.skynet.be>
Richard Clamp wrote:
>3.1 an OS? Okay, I won't go there, I'd lose you too easily.
It may be a toy OS, but it's an OS nevertheless.
Bart.
------------------------------
Date: Wed, 20 Jan 1999 14:15:50 GMT
From: droby@copyright.com
Subject: Re: Perl Criticism
Message-Id: <784oed$7os$1@nnrp1.dejanews.com>
In article <783l0u$ajk$1@nnrp1.dejanews.com>,
topmind@technologist.com wrote:
>
> Self policing does not work and managers are not trained
> or have no incentive on weeding out the cryptologists in
> a good many cases.
>
You're saying we should change a programming language because some managers
don't feel an incentive to manage?
> Bleep happens, and so does bad code.
>
Indeed. In all languages. And no matter how constricting you make the
language, bad code will be written in it.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 20 Jan 1999 15:11:44 GMT
From: richardc@tw2.com (Richard Clamp)
Subject: Re: Perl Criticism
Message-Id: <36a5f0f6.18556721@news.highwayone.net>
On Wed, 20 Jan 1999 13:57:55 GMT, bart.lateur@skynet.be (Bart Lateur)
wrote:
>Richard Clamp wrote:
>
>>3.1 an OS? Okay, I won't go there, I'd lose you too easily.
>
>It may be a toy OS, but it's an OS nevertheless.
My understanding was that Windows 3.1 was a graphical shell for DOS.
DOS/Windows is more analogous to Unix/X-Windows but only in terms of
the layered structure, but then we'll end up at the difference in
personalities from the kernel to the shell if we go further down this
road.
Richard
--
Richard Clamp richardc@tw2.com
Frisbeetarianism, n.:
The belief that when you die, your soul goes up on the roof and gets stuck
------------------------------
Date: Wed, 20 Jan 1999 10:00:31 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl Criticism
Message-Id: <fl_aggie-2001991000310001@aggie.coaps.fsu.edu>
In article <784oed$7os$1@nnrp1.dejanews.com>, droby@copyright.com wrote:
+ In article <783l0u$ajk$1@nnrp1.dejanews.com>,
+ topmind@technologist.com wrote:
+ >
+ > Self policing does not work and managers are not trained
+ > or have no incentive on weeding out the cryptologists in
+ > a good many cases.
+ >
+
+ You're saying we should change a programming language because some managers
+ don't feel an incentive to manage?
I see...topmind is here to protect us from ourselves. Before long, he'll be
working for the government, certifying programmers and languages that they
comply with new government regulations.
James
------------------------------
Date: Wed, 20 Jan 1999 15:16:10 -0000
From: "James Richardson" <richardsonja@logica.com>
Subject: Re: Perl Password Hiding Challenge
Message-Id: <784s0f$ocj@romeo.logica.co.uk>
Martien Verbruggen wrote in message ...
>In article <783bgm$2k9$1@nnrp1.dejanews.com>,
> jbharvey@auspex.net writes:
>
>
>You can't stop root from anything. Anything you can do, root can do.
>You can't stop anyone who has hijacked your account. Anything you can
>do, they can do.
>
>
>Encryption and decryption won't really work, since the decryption
>stuff has to be readable again.
>
>Anyone with a better idea?
>
It all seems to come down to 'locality of security', really. The whole thing
about encryption, and passwords and so forth depends on where you take it
that your system begins being secure.
On a UNIX system, you have to basically assume that root is 'secure' and
'benevolent', that is, only certain known people are root, and they are
trustworthy enough not to look at your stuff.
There is no right answer, you just have to make sure that your security
arrangements are 'good enough' given the 'secure & benevolent' rule above.
With scripts you have a lot more hard work, becaue the source is visible,
one way around this maybe to use an 'obfuscator', I believe there is one for
perl, but this just moves the problem one step further away, making it
difficult to get the information you think thay might want, but then again,
'security through obscurity' is no good if people really want the
information (but it might just stop somebody browsing past it....) (just
realised that Martien just said that!)
James
------------------------------
Date: Wed, 20 Jan 1999 09:59:42 +0000
From: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: Re: Perl problem :(Offline mode...
Message-Id: <JcV9yBAOkap2EwI4@beausys.demon.co.uk>
In article <slrn7aa7ke.mma.sholden@pgrad.cs.usyd.edu.au>, Sam Holden
<sholden@pgrad.cs.usyd.edu.au> writes
>On Tue, 19 Jan 1999 21:46:50 +0000, Andrew Fry <andrewf@beausys.demon.co.uk>
> wrote:
>>
>>Doh! You're right. I converted my non-CGI program so that it could
>>run in non-CGI or CGI mode, tested as CGI and then returned to
>>testing as non-CGI ... which is when I came across the problem.
>>I guess the "name=value pairs" should have given me a clue.
>>Just inexperience!
>
>Just not bothering to read the manual!
I am well aware of manuals, on-line docs, etc ... but I dont have
time to plough through lots of manuals/docs (do you ???), and I
know by experience that one doesnt always find what one is looking for
in documentation.
The fact is that I run a small comms/networking consultancy & software
house ... and we work to very tight deadlines. Having the time to read
and learn is something of a luxury.
I appreciate the helpful replies, but frankly, I dont see the point in
these discussion groups if the reply is just going to be 'read the
manual'!
---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).
------------------------------
Date: Wed, 20 Jan 1999 11:06:50 -0400
From: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: problem with Data::Dumper
Message-Id: <Pine.GSO.3.95.iB1.0.990120105445.29992B-100000@halifax.chebucto.ns.ca>
Exactly what do you mean by downloaded and "just"? I have to use Windows
at work, and I tried the procedure 5 minutes ago, although it was already
in \lib.
ppm> install Data-Dumper
returns Data::Dumper 2.09. If your ActiveState @INC is like the one on my
workbox, \lib comes before \site\lib, and the latter is where the new
Data::Dumper will be, but just qualify your 'use' statement with the
version number, 2.09, and all should be well.
On Wed, 20 Jan 1999, A. Barry wrote:
> I just got downloaded Data::Dumper from Activestate. The book I learned
> about it (Perl 5 Complete) treats it as the best thing since sliced
> bread.. You give it a structure and it prints it out in a form that you
> can read and Perl can evaluate.. Really useful.
>
> Only problem.. When I try to use Data::Dumper I get...
> My question is.. does anyone have a working version of this? I have
> version
> 2.081 of Data::Dumper (according to the comments).
>
> P.S. I'm running on Win 95 if it matters.
------------------------------
Date: Wed, 20 Jan 1999 14:01:41 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: problem with: use module;
Message-Id: <36a7e112.871385@news.skynet.be>
Fluffy wrote:
>You forgot to meow. Add the following as the last line in Module.pm:
>
> 'meow';
>
>and all will be well.
>
>(Okay, any true statement will work, but meowing has so much more
>panache than a simple 1.
Funny. Too bad you can't forget about the quoting, or you'd get
warnings.
>Unquoted string "meow" may clash with future reserved word
>Useless use of a constant in void context
You could also say
42
which would also add some mystery. And it's the answer to the question
on life, the universe and everything.
Bart.
------------------------------
Date: 20 Jan 1999 15:00:28 GMT
From: meowing@banet.net (Fluffy)
Subject: Re: problem with: use module;
Message-Id: <784r26$6sv@meow.invalid>
Bart Lateur <bart.lateur@skynet.be> wrote:
> Fluffy wrote:
> >You forgot to meow. Add the following as the last line in Module.pm:
> > 'meow';
> >and all will be well.
>
> Funny. Too bad you can't forget about the quoting, or you'd get
> warnings.
Of *course* you need to quote it, otherwise it would be plagiarism.
You should be grateful that I don't demand a copyright notice and
royalties.
> You could also say
> 42
> which would also add some mystery. And it's the answer to the question
> on life, the universe and everything.
But it's not a meow.
--
"Meow." --me
------------------------------
Date: 20 Jan 1999 09:53:40 +0000
From: Piers Cawley <pdcawley@bofh.org.uk>
Subject: Re: protecting scripts
Message-Id: <s7pu2xmmfrv.fsf@windrush.elsevier.co.uk>
Eugene Sotirescu <eugene@snailgem.org> writes:
> KernelKlink@webtv.net wrote:
[stuff about protecting perl source]
>
> The short answer is: forget it.
And the long answer is a painfully vitriolic thread which ends with
everyone calling everyone else fascists and/or communists and probably
with (?:Tom|Larry|Randal|$perl_notaries_pattern) being likened to
Hitler.
Therefore, in the interests of mental bandwidth, can we kill this
thread now?
--
Where is the Life we have lost in living?
Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?
TS Eliot -- The Wasteland
------------------------------
Date: Wed, 20 Jan 1999 10:19:33 -0500
From: Stephen <stephen@edtechnews.com>
Subject: Re: Req: HTMl parser script/module
Message-Id: <36A5F400.5D6600D1@edtechnews.com>
There's a module on the CPAN site called HTML-Parser 2.22 that can search
through an html file and return only text from any of the the html tags
you specify. Here's an example:
require HTML::HeadParser;
$p = HTML::HeadParser->new;
GO: while(1){
print "What file would you like to use\?\n=>";
$file = <STDIN>;
chomp $file;
exit if($file eq 'quit');
if(-e $file){
$f = $p->parse_file($file) unless($file eq 'quit');
} else {
print "!!!-->Can't find $file","\n",$!,"\n";
next GO;
}
print "Title\:",$f->header('Title'),"\n",
"Content Type\:",$f->header('content-type'),"\n",
"Generator\:",$f->header('X-Meta-generator'),"\n",
"Description\:",$f->header('X-Meta-description'),"\n",
"Keywords\:",$f->header('X-Meta-keywords'),"\n";
}
Serial # 0 wrote:
> When creating Interactive web-apps its often teamwork between a
> graphic designer which creates fancy HTML pages and poor souls called
> programmers (me) which puts something usefull on the screen, like the
> next multiplechoice question of a quiz (all questions are located in a
> text file), an on the fly generated GIF for weather prognoses etc
> etc.... Putting all the HTML code in the Perl program is a nightmare
> for the graphic designer. Hence HTML templates (created by the
> designer) are used with TAGS inside them. A Perl script called via
> CGI calculates a HTML code for a table or reads the next question....
> Inside the Perl script the HTML template is read (which is ouputted to
> the calling client after parsing) and the TAGS inside are used to
> place a table in the HTML code or displaying the next question in a
> table (by variable substitution) which is created by the designer....
>
> So far I've got a simple function called ParseHTML which can replace
> variables in a HTML template. What I'm looking for is a more advanced
> parser which can for example deal with $if then else constructs in
> HTMl templates, have while loops etc. In the past at another firm I've
> used a C++ function from an inhouse library which did just that. I
> expected to find quite a lot of parsers for Perl to tackle is problem
> but I can't find them. I've looked a couple of times at the Web and
> CPAN but to no avail. Have found HTML::Parse which is IMO is not hat
> I'm looking for.
>
> If something can provide me with such a parser I would be gratefull or
> if you have come up with an even better solution for this raterh
> elementary problem I would like to hear from you. I can't imaging I'm
> the only guy struggling with this problem.
>
> Except for replying in this group an Email to jan@planet.nl (work) is
> very much appreciated.
>
> Jan Bessels
> ============
------------------------------
Date: Wed, 20 Jan 1999 15:33:49 +0100
From: Klaus Johannes Rusch <KlausRusch@atmedia.net>
Subject: Re: SHTML output?
Message-Id: <36A5E94D.5E0B0200@atmedia.net>
Glen Gower wrote:
>
> I'm trying to get a CGI script to output an *shtml* page, instead of a
> *html* page. I thought it would be a simple thing to do, just change:
>
> sub return_html {
> print "Content-type: text/html\n\n";
> to
> sub return_html {
> print "Content-type: text/shtml\n\n";
* This is not a Perl question.
* There is no MIME type text/shtml
* This is not a Perl question.
* How server-side includes (SSI) get activated for CGI output largely
depends on the webserver. Some don't support SSI for CGI output at all.
* This is not a Perl question. comp.infosystems.www.authoring.cgi,
comp.infosystems.www.servers.misc or your server documentation are
probably better places for your question.
Klaus Johannes Rusch
--
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/
------------------------------
Date: Wed, 20 Jan 1999 10:27:46 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <36a5a6c7.7715369@news.skynet.be>
Abigail wrote:
>Greg Bacon (gbacon@itsc.uah.edu) wrote on MCMLXVII September MCMXCIII in
><URL:news:782ist$q2b$2@info.uah.edu>:
>II In article <36a84e4c.2986601@news.skynet.be>,
>II bart.lateur@skynet.be (Bart Lateur) writes:
>II : I object! Abigail cheated!
>II
>II Yeah, I know. I noticed that she was using different quote characters
>II and thought about updating the quote regular expression. I decided
>II that it would be too long and ugly. I can wait until we get the nice
>II [:ispunct:] in the regular expression engine. :-)
>
>Wouldn't [^\w\s] do?
No. For starters, you've used underscores too. That is part of "\w".
I've inspected the 45 messages I have of you in my newsreader. This is
the pattern I've discovered:
* a "punctuation mark", repeated. These are the characters:
! " # $ % & ' * + , - . / : ; = ? @ \ ^ _ ` | ~
* an opening "paren", followed by the complementary closing one:
[] () {} <>
That catches 44 of them. But ARGHH! In this last message, Abigail used
capital i's!
Anyway, I suggest replacing the original regexp with (tested):
/^\s{0,3}(?:>|:|\S+>|([!"#\$%&'*+,\-.\/:;=?\@\\^_`\|~])\1|\[\]|\(\)|\{\}|<>)/
Ugly? Yes.
Bart.
------------------------------
Date: Wed, 20 Jan 1999 10:27:49 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <36a6adb6.9477748@news.skynet.be>
Tom Christiansen wrote:
>:I object! Abigail cheated!
>
>`cheated'?
Yes. Do I *really* need to add a smiley on such obvious places? It would
have spoiled the fun.
Bart.
------------------------------
Date: Wed, 20 Jan 1999 16:25:47 +0100
From: Lycos Development <dennis@bilbo.iok.net>
Subject: tty - question
Message-Id: <36A5F57B.FAFCC1CF@bilbo.iok.net>
Hi,
I am writing an application, which is supposed to access a modem via a
tty on a linux machine.
I am not sure what I need to do...do I have to open and treat it like a
usual file, or do I have to set up certain things to get that working.
It would be very kind, if someone could give me a hint! Every help is
greatly apreciated!
Thanks in advance,
Dennis
P.S.: Since the news server I use has an awfully short expire-period, it
would be nice, if you could send a copy of your answer to
dennis@bilbo.iok.net to make sure that I do not miss it : )
Thanks
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 4698
**************************************