[12590] in Perl-Users-Digest
Perl-Users Digest, Issue: 6190 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 1 11:07:19 1999
Date: Thu, 1 Jul 99 08:00:18 -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 Thu, 1 Jul 1999 Volume: 8 Number: 6190
Today's topics:
Getting the IP-Destination of a Packet stuckenbrock@my-deja.com
Re: HELP!!!! PLEASE!!!! <kperrier@blkbox.com>
Re: How to store hashes (Abigail)
Is perl 8-bit safe? <hseverin@bbn.com>
Looking for old version of Perl <robert.greenwood@citicorp.com>
Re: make my day fix an array :-) <thomas@bibsyst.no>
Re: make my day fix an array :-) <uri@sysarch.com>
Re: module to connect to a Microsfot Access mdb databas (Andreas Fehr)
Re: module to connect to a Microsfot Access mdb databas <webbat@globalnet.co.uk>
Re: module to connect to a Microsfot Access mdb databas <rhrh@hotmail.com>
Re: Modules on Win32 <toby@venice.cas.utk.edu>
Re: Modules on Win32 <craig@mathworks.com>
newbie in PERL: Can you please suggest a solution? info@sisblansko.cz
Re: newbie in PERL: Can you please suggest a solution? <toby@venice.cas.utk.edu>
Re: Perl Problem with Netscape, but not lynx... <kperrier@blkbox.com>
Re: Perl/CGI seems an inconsistant language... <kperrier@blkbox.com>
Re: Saving both exit status and output from a command <bivey@teamdev.com>
Re: Should I use fetchrow_hashref for this? ()
Re: Socket error : Prototype not supported (Anno Siegel)
unix passwd auth in CGI <achaubal@admin.tavsnet.com>
unix passwd auth in CGI <achaubal@admin.tavsnet.com>
Re: XML::Parser Objects Style problem (Arved Sandstrom)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 01 Jul 1999 13:40:29 GMT
From: stuckenbrock@my-deja.com
Subject: Getting the IP-Destination of a Packet
Message-Id: <7lfr4c$dop$1@nnrp1.deja.com>
Hello there,
I'm trying to write a script thats listening on one
Network-Interface/Port, if it recieves a Packet it should look into the
IP-Header for the destination-address, then it should (on another
Network-Interface) connect the destination host and send him the packet.
By the way it should do some scanning of the packet at the
applicationlevel-protocol. It is meant to become some kind of generic
transparent TCP-proxy.
My problem is that I don't know how to determine the
IP-destination-address and scan the applicationlevel-protocoll at the
same time.
Idea anyone?
Thanx
S.Stuckenbrock
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 01 Jul 1999 08:54:13 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: HELP!!!! PLEASE!!!!
Message-Id: <ysik8sk4gsa.fsf@blkbox.com>
Ice Nyne <anfinger@mediaone.net> writes:
> How do I start the program activeperl?!? please help!
By reading the nice documentation that came with it.
------------------------------
Date: 1 Jul 1999 08:45:26 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to store hashes
Message-Id: <slrn7nms75.31h.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXX September MCMXCIII in
<URL:news:37800700.2487937@news.skynet.be>:
^^ Abigail wrote:
^^
^^ >!! I would use a tab-delimited file.
^^ >
^^ >That's about the last thing I would do.
^^ >
^^ >Why not use a DBM file?
^^
^^ DB files tend to grow terribly big. If you just want to store some
^^ temporary session data, tab-delimited text files are as small as it can
^^ get.
DB files don't get that big for small amounts of data.
^^ Plus, (some) DB engines do have a reputation of being not too robust.
^^ See the recent thread about the Berkely DB ("Tied hash not scaling -
^^ advice?", <news:7lbp4n$2d0$1@shell2.ba.best.com>), and in the "full-text
^^ searching in Perl" article in DDJ jan 1999 ("I've had several
^^ crashes...").
On the other hand, dbmfiles work flawlessly for thousands of applications,
be they in Perl or in a different language.
^^ >Or, if you plan to read/write the entire hash
^^ >at once, something like Data::Dumper, Storable, or FreezeThaw?
^^
^^ Hmmm... executable datafiles? Nice. World-writable, no less. Very
^^ secure.
Huh? If you want to make them executable and world writable, that's
fine with me, but why should I take the blame?
^^ Aren't you promoting pre-canned solutions just because they are just
^^ that: "pre-canned"?
Yeah, that's why I don't invent a new language every day. I use a
pre-canned solution: Perl!
^^ >I don't understand your point about spreadsheet cells. We're talking
^^ >about hashes, don't we?
^^
^^ I'm taking about "real live data". Many (most?) DB engines don't even
^^ allow tabs or newlines in their data fields. Most users never miss it.
I refuse to take such "engines" seriously. I don't think one of those
horrible "pre-canned" solutions has such limitations.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 01 Jul 1999 14:04:13 GMT
From: Harriet Severinio <hseverin@bbn.com>
Subject: Is perl 8-bit safe?
Message-Id: <377B754E.BCD7D187@bbn.com>
I am using perl scripts quite heavily, and we need to add support for
European languges to our product. This means 8-bit character encoding.
Has anyone tested perl 4 and perl 5 for handeling 8-bit characters?
------------------------------
Date: Thu, 01 Jul 1999 08:55:55 -0400
From: Robert Greenwood <robert.greenwood@citicorp.com>
Subject: Looking for old version of Perl
Message-Id: <377B655B.83F86659@citicorp.com>
Hi
Does anyone know how I can get hold of an old copy of the
Perl source distribution? I'm looking for 4.0.1.8.
I've just spent some time looking through www.cpan.org and
www.perl.com, but didn't manage to find anything about old
versions.
Can anyone help?
Thanks
Rob.
------------------------------
Date: Thu, 01 Jul 1999 15:58:48 +0200
From: Thomas Weholt <thomas@bibsyst.no>
Subject: Re: make my day fix an array :-)
Message-Id: <377B7418.7352ED9E@bibsyst.no>
Ok, it should say asshole, but somebody said something about an
pg-13-rating so ...
revjack wrote:
> Thomas Weholt explains it all:
>
> :Can`t you answer one posting without being an a**h**e?
>
> Personally, I'm glad that Uri serves as such an effective archive.
--
-------------------------------------------------
| Thomas Weholt |_.|._| |
| Email : thomas@bibsyst.no <-|-> |
-------------------------------------------------
------------------------------
Date: 01 Jul 1999 10:40:57 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: make my day fix an array :-)
Message-Id: <x7btdw4eme.fsf@home.sysarch.com>
>>>>> "TW" == Thomas Weholt <thomas@bibsyst.no> writes:
>>
>> duh!!
>>
TW> Can`t you answer one posting without being an a**h**e? I`ve read
TW> almost every reply you have given and they all contain some
TW> stupid, non-constructive remarks. I don`t understand why you have
TW> the strange need to behave like such an arrogant know-it-all in
TW> every thing you do in this group. You are most probably a great
TW> perl-hacker, but a supportive tutor-like, guru-could-be you`re
TW> most definitly not.
well, after being stealth cc'ed by you i think my comment was even more
on target. what i reply to and how i do so is my choice. others can kill
file me or ignore me. i choose to ignore most posts here (the volume is
deafening). your post triggered my reply mechanism and the sarcasm that
came with it. it wasn't even hard nor a real perl problem, just a flow
ofr control. you should leanr some computer science. as for my style of
reply it depends on may factors, the style of the poster, my mood, my
cat's mood, the phase of jupiter's moons, larry wall's cat's mood, how
rich uncle bill is, among amny other things. i actualy enjoy solving
problems and helping others. but i like to have fun and my replies can
show that. so get off you high horse and off that stick up your butt and
get a life with some humor in it. if every time someone tease you or
used sarcasm on you, you reacted with such a lack of grace and wit that
you will forever be reacting poorly to those who actually ae trying to
help you. this is not a friendly forum of nice folks. this is a perl
hacker newsgroup. we act as we please and you take from it what you
can.
TW> Yours truly
i doubt it since i am an 'a**h**e' according to you. so which is it?
are you polite or just a script kiddie with no respect?
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Thu, 01 Jul 1999 13:20:33 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: module to connect to a Microsfot Access mdb database
Message-Id: <1103_930835233@chstaw0439>
On Thu, 1 Jul 1999 12:48:54 +0100, "david" <webbat@globalnet.co.uk> wrote:
> as a newbie can someone please direct me to a perl module so that i can
> connect my web pages to a MS Access mdb database table...
>
> anyhelp would be much app.
>
> thanx in advance
>
> David
>
There might be others, but I use the ODBC module of Dave Roth.
http://www.roth.net/perl/odbc/
Andreas
------------------------------
Date: Thu, 1 Jul 1999 14:40:24 +0100
From: "david" <webbat@globalnet.co.uk>
Subject: Re: module to connect to a Microsfot Access mdb database
Message-Id: <7lfrav$sks$1@gxsn.com>
thank you kindly.
Andreas Fehr <backwards.saerdna@srm.hc> wrote in message
news:1103_930835233@chstaw0439...
> On Thu, 1 Jul 1999 12:48:54 +0100, "david" <webbat@globalnet.co.uk> wrote:
> > as a newbie can someone please direct me to a perl module so that i can
> > connect my web pages to a MS Access mdb database table...
> >
> > anyhelp would be much app.
> >
> > thanx in advance
> >
> > David
> >
>
> There might be others, but I use the ODBC module of Dave Roth.
> http://www.roth.net/perl/odbc/
>
> Andreas
------------------------------
Date: Thu, 01 Jul 1999 14:16:50 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: module to connect to a Microsfot Access mdb database
Message-Id: <377B6A42.F25E2615@hotmail.com>
david wrote:
>
> as a newbie can someone please direct me to a perl module so that i can
> connect my web pages to a MS Access mdb database table...
>
> anyhelp would be much app.
Look at DBI.pm and DBD::ODBC.pm for that if you want, and also try
comp.lang.perl.modules
for module questions, lower traffic, more specific responses,
Richard H
------------------------------
Date: Thu, 01 Jul 1999 09:45:43 -0400
From: toby <toby@venice.cas.utk.edu>
To: Jordan Hiller <hiller@email.com>
Subject: Re: Modules on Win32
Message-Id: <377B7107.D809B547@venice.cas.utk.edu>
Sorry about the other answer. Just saying 'ppm' is just like saying, "keys" when
someone asks you how to use drive your car. Just go the the command prompt
(MSDOS) and type 'ppm'. At ppm's prompt, type 'help' for rotten instructions. You
can list the modules available by typing 'summary'. I wrote a nifty little script
that captures the quickly scrolling content of 'summary' (ppm doesn't seem to
have a paging function) and puts it in a text file. Type 'install <package>'
where package
eq the module's name in the ppm summary (case-sensitive). BTW, the modules come
from ActiveState not CPAN, so Caveat Perlor. Should should try to compile them
yourself. Get Cygnus' Cygwin2.0 shell environment. This is a bash-like shell with
C development stuff built into it and is GNU (in the purest sense of the term).
It is more difficult than 'ppm' to make your modules this way, but after you do
it once or twice you'll see the benefit and be able to hold this bit of arcanity
over your boss' head.
Toby
Jordan Hiller wrote:
> This must be a FAQ but I can't find the answer anywhere...
>
> I run ActiveState's Perl for Win32 on my Windows 98 machine. How do I install
> modules from CPAN?
>
> TIA,
> Jordan Hiller
> (please cc to hiller@email.com)
>
> :~
------------------------------
Date: Thu, 01 Jul 1999 10:57:53 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Modules on Win32
Message-Id: <377B81F1.D4E41D01@mathworks.com>
Jordan Hiller wrote:
> I've now upgraded ActivePerl and got PPM. However, they sure don't seem to have
> a very complete set of modules. I need the following modules that don't seem to
> be available from PPM:
>
> LWP::Simple
> HTML::FormatText
> HTML::Parse (or is it HTML::Parser? an example code from the FAQ said
> HTML::Parse)
With the exception of HTML::FormatText, the other modules you mention are
inclided with the distribution.
Craig
------------------------------
Date: Thu, 01 Jul 1999 14:24:58 GMT
From: info@sisblansko.cz
Subject: newbie in PERL: Can you please suggest a solution?
Message-Id: <7lftnb$er6$1@nnrp1.deja.com>
I have several fields such as First name, Surname, Address and
Age.(They can be separated by commas on one line like a text file). I
need to allow users to add, save, browse, choose and possibly delete
records(lines). I think the best solution would be to use a database but
it seem to be rather difficult in PERL. Is there a more simple way how
to do it in PERL? Thanks for an advice.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 10:31:01 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: newbie in PERL: Can you please suggest a solution?
Message-Id: <377B7BA5.2110CA4A@venice.cas.utk.edu>
Use the Text::CSV_XS module which offers an interface to comma separated
text files (*.csv for MS Excel). The API is similar to SQL and really simple
to use.
Toby
info@sisblansko.cz wrote:
> I have several fields such as First name, Surname, Address and
> Age.(They can be separated by commas on one line like a text file). I
> need to allow users to add, save, browse, choose and possibly delete
> records(lines). I think the best solution would be to use a database but
> it seem to be rather difficult in PERL. Is there a more simple way how
> to do it in PERL? Thanks for an advice.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: 01 Jul 1999 08:53:33 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Perl Problem with Netscape, but not lynx...
Message-Id: <ysin1xg4gte.fsf@blkbox.com>
"Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net> writes:
> illiath@my-deja.com wrote:
> >
> > Hope someone can tell me what I am doing wrong here.
>
> You have an error on line 27.
You are blind! The error is on line 24! :)
Kent
------------------------------
Date: 01 Jul 1999 08:59:31 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Perl/CGI seems an inconsistant language...
Message-Id: <ysihfno4gjg.fsf@blkbox.com>
T Hite <thite@mindspring.com> writes:
> --------------97CDBD6C62299DB5CF081BD0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
Usenet is an ascii environment. Please, no MIME or HTML
>
> Hi all,
<SNIP>
>
> #!/usr/bin/perl
> $datenow = `date`;
> $sayit2 = `sayit2`; // our 2nd perl script that never gets
> called thru CGI
> // but IS called when run under
> the console.
Well, if you are using '//' as your comment characters then I am
surprised that the script even compiles. Also, if this is a cgi
script, why aren't you using CGI.pm?
Kent
------------------------------
Date: 1 Jul 1999 14:13:53 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: Saving both exit status and output from a command
Message-Id: <01bec3cc$02ff8f00$583c08cf@bill.jump.net>
TM Lehto <hiwi1krg@iitb.fhg.de> wrote in article
<377b5fc5.71389803@iitb>...
[...]
> # First check that command exits without error:
> system("/some/command") and die "Error!";
> # Now I know I'm going to get output I expect (ie. no error
> # messages),so I can save the output:
> $output = `/some/command`;
> ...do something with $output...
>
> is there a way to do the same without running the command twice?
I believe you'll find the return value in $?. Assuming the command
returns something interesting on error vs. success, that may be what
you need.-Wm
------------------------------
Date: 1 Jul 1999 14:38:20 GMT
From: redmondm@yahoo.com ()
Subject: Re: Should I use fetchrow_hashref for this?
Message-Id: <slrn7nmvav.csu.redmondm@kells.kells>
In article <7lf30l$5fa$1@nnrp1.deja.com>, GJohn wrote:
>
> * My documentation suggests fetchrow_hashref "is currently not
>portable between databases because different databases return field
>names with different letter cases". Also, it says "currently a new hash
>reference is returned for each row. This is likely to change so don't
>rely on it". Do you think fetchrow_hashref is okay to use?
>
And, if you join two tables and each table has a field called 'name'
it's uncertain what you will end up with in $hashref->{'name'}.
Most likly the value from the second table.
Martin
>
>Gary Robertson
------------------------------
Date: 1 Jul 1999 13:12:56 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Socket error : Prototype not supported
Message-Id: <7lfpgo$g60$1@lublin.zrz.tu-berlin.de>
Jon Lustig <jon@sitedesignonline.com> wrote in comp.lang.perl.misc:
>This is a multi-part message in MIME format.
Please don't post mime format if you can avoid it.
[snippage]
>I'm creating a little cookie server, based on that from ORA's CGI
>Programming. After a little trial and error, I went with the Socket
>package, and I'm getting the following error when I try to create the
>socket: 'Protocol not supported at ...'
>
>I know nothing of sockets, but i looked up the system getprotobyname
>call and the /etc/protocols file looks in order, complete with 'tcp'
>entry - what am I missing?
>
>Here's the relevant code:
>---------------------------------
>require Socket;
>
>my $proto = getprotobyname('tcp');
>
>socket(SOCKET,PF_LOCAL,SOCK_STREAM,$proto) or die "socket : $!";
>---------------------------------
First off, you should say 'use Socket' if you want it to import
things into your namespace. Secondly, you don't want PF_LOCAL
but PF_UNIX. Finally, the tcp protocol is indeed not supported
with PF_UNIX, you can use ip instead.
You may want to move to PF_INET and keep tcp, though. You'll
sacrifice a bit of performance (or so they say), but you'll find
that most socket examples are written that way, so they'll fit exactly.
Anno
------------------------------
Date: Mon, 28 Jun 1999 09:11:00 -0400
From: "Ameet Chaubal" <achaubal@admin.tavsnet.com>
Subject: unix passwd auth in CGI
Message-Id: <7lfp1e$9ui$1@frontier2.tavsnet.com>
Hi all
I am trying to write a form in CGI which would allow the user to change his
unix passwd.
If I run the "passwd" command; it asks the user to enter the passwd again in
order to confirm it.
Is there any other way to get the passwd twice on a form and match it
against the encrypted passwd in
/etc/shadow?
Thanks
Ameet
------------------------------
Date: Thu, 1 Jul 1999 10:01:52 -0400
From: "Ameet Chaubal" <achaubal@admin.tavsnet.com>
Subject: unix passwd auth in CGI
Message-Id: <7lfs0v$b65$1@frontier2.tavsnet.com>
Hi all
I am trying to write a form in CGI which would allow the user to change his
unix passwd.
If I run the "passwd" command; it asks the user to enter the passwd again in
order to confirm it.
Is there any other way to get the passwd twice on a form and match it
against the encrypted passwd in
/etc/shadow?
Thanks
Ameet
------------------------------
Date: Thu, 01 Jul 1999 11:06:09 -0300
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: XML::Parser Objects Style problem
Message-Id: <Arved_37-0107991106090001@dyip-120.chebucto.ns.ca>
In article <so79ge9u.fsf@eagle.larscom.com>, Ken Malone
<malone@eagle.larscom.com> wrote:
> It seems to me that would be a semi-intuitive yet compact and perlish way of
> handling small to medium sized XML blocks. Specifically I'd like to feed
> arrays of elements to CGI.pm functions. Any ideas ?
>
> Ken Malone
> maloneSHIFT-2larscom.com
Hi, Ken
I'm not sure if it'll fit the bill, as I don't really use it myself, but
it strikes me that you're looking for a data structure that you can
quickly and Perlishly get Perl data structures from. So I suggest looking
at XML::Grove.
You still instantiate an XML::Parser object, but XML::Grove creates a new
style called 'grove'.
Arved
------------------------------
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 6190
**************************************