[16690] in Perl-Users-Digest
Perl-Users Digest, Issue: 4102 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 23 06:05:47 2000
Date: Wed, 23 Aug 2000 03:05:31 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967025128-v9-i4102@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 23 Aug 2000 Volume: 9 Number: 4102
Today's topics:
Re: @_ as array (Helgi Briem)
Re: @_ as array (Helgi Briem)
Re: @_ as array (Villy Kruse)
A logfile problem <jamesmckay@MailAndNews.com>
A logfile problem <jamesmckay@MailAndNews.com>
Re: ActivePerl Install Failed <wlackner@iicm.edu>
ANNOUNCE: AI::NeuralNet::BackProp 0.20 <jdb@wcoil.com>
Re: ANNOUNCE: AI::NeuralNet::BackProp 0.20 (Eric Bohlman)
ANNOUNCE: AI::NeuralNet::Mesh 0.20 <jdb@wcoil.com>
ANNOUNCE: PCX::Loader v0.50 <jdb@wcoil.com>
Associative arrays <alex.buell@tahallah.clara.co.uk>
Re: Associative arrays (Rafael Garcia-Suarez)
breaking long lines <mslho@my-deja.com>
Re: breaking long lines (Marcel Grunauer)
Re: breaking long lines (Neil Kandalgaonkar)
Re: creating an enviroment variable <a58289@yahoo.com>
Re: errno 22 1024 char limit writing to DB's <gellyfish@gellyfish.com>
Re: Forking in WinNT <kmsproule@worldnet.att.net>
Re: Functions and reference notation. (Abigail)
Generalized "User Database"? <mkruse@netexpress.net>
Re: Generalized "User Database"? (Martien Verbruggen)
Re: Hashref infix misunderstood? (Keith Calvert Ivey)
Re: Hashref infix misunderstood? (Anno Siegel)
Re: Help: Excel Automation question! nidhi_naith@my-deja.com
Re: how can I use perl to get a website? nobull@mail.com
Re: how convert to binary, hex etc (Abigail)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 23 Aug 2000 09:47:01 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: @_ as array
Message-Id: <39a39d37.174621642@news.itn.is>
On Tue, 22 Aug 2000 13:11:46 +0200, "LecturaX Porodum"
<haak12@remove.ie.hva.nl> wrote:
>Hi,
>
>How can I best achieve to retrieve the second element (element 1) from @_?
>
>I get a warning when I do @_[1], but I imagine $_[1] wouldn't work either,
>as $_ is a reserved variable as well.
>
my ($notwanted,$wanted) = @_;
------------------------------
Date: Wed, 23 Aug 2000 09:56:51 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: @_ as array
Message-Id: <39a39f9a.175232981@news.itn.is>
On Wed, 23 Aug 2000 09:47:01 GMT, helgi@NOSPAMdecode.is
(Helgi Briem) wrote:
>On Tue, 22 Aug 2000 13:11:46 +0200, "LecturaX Porodum"
><haak12@remove.ie.hva.nl> wrote:
>
>>Hi,
>>
>>How can I best achieve to retrieve the second element (element 1) from @_?
>>
>>I get a warning when I do @_[1], but I imagine $_[1] wouldn't work either,
>>as $_ is a reserved variable as well.
>>
>
>my ($notwanted,$wanted) = @_;
>
Oh yes, sorry I forgot to mention that
$_[1] will work too.
Regards
Helgi Briem
------------------------------
Date: 23 Aug 2000 10:03:03 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: @_ as array
Message-Id: <slrn8q78am.igu.vek@pharmnl.ohout.pharmapartners.nl>
On Wed, 23 Aug 2000 09:47:01 GMT, Helgi Briem <helgi@NOSPAMdecode.is> wrote:
>On Tue, 22 Aug 2000 13:11:46 +0200, "LecturaX Porodum"
><haak12@remove.ie.hva.nl> wrote:
>
>>Hi,
>>
>>How can I best achieve to retrieve the second element (element 1) from @_?
>>
>>I get a warning when I do @_[1], but I imagine $_[1] wouldn't work either,
>>as $_ is a reserved variable as well.
>>
>
>my ($notwanted,$wanted) = @_;
>
my @Array = qw(1 2 3 4 5 6 7);
Would you hesitate to say $Array[1] to get to the second element?
Replace the word 'Array' with the word '_' and you will get $_[1]
as the second element of the @_ array.
Villy
------------------------------
Date: Wed, 23 Aug 2000 06:00:41 -0400
From: James <jamesmckay@MailAndNews.com>
Subject: A logfile problem
Message-Id: <39B17724@MailAndNews.com>
Hi All,
Does anyone know of a way of sending all the output of a perl script
to
a file, without having to resort to specific open-write-close operations for
each step. Basically I want to generate a journal of every action the
script
performs, including all user interaction. This is simple in unix shell
scripting, in that you simply make the whole script a function and divert
the
standard output. However I can't seem to do anything similar in perl. I'm
sure there must be a way. Any ideas?
Thanks in advance
James
------------------------------
Date: Wed, 23 Aug 2000 06:01:00 -0400
From: James <jamesmckay@MailAndNews.com>
Subject: A logfile problem
Message-Id: <39B17870@MailAndNews.com>
Hi All,
Does anyone know of a way of sending all the output of a perl script
to
a file, without having to resort to specific open-write-close operations for
each step. Basically I want to generate a journal of every action the
script
performs, including all user interaction. This is simple in unix shell
scripting, in that you simply make the whole script a function and divert
the
standard output. However I can't seem to do anything similar in perl. I'm
sure there must be a way. Any ideas?
Thanks in advance
James
------------------------------
Date: Wed, 23 Aug 2000 11:22:22 +0200
From: Wilfried Lackner <wlackner@iicm.edu>
Subject: Re: ActivePerl Install Failed
Message-Id: <39A397CE.95AF6C09@iicm.edu>
Do you have admin Rights on NT?
I have got the same Error, so i login to my acoount with admin rights and
the Error was passed.
hope it help.
mfg. wilffried
sumera.shaozab@lmco.com wrote:
> Hello,
>
> I am trying to install the latest verstion of ActivePerl for My Windows
> NT workstation. When I tried to install the Windows installer, I get
> this error:
>
> Internal Error 2336. 5, C:\TEMP\MSI766.tmp
>
> A different tmp file gets created everytime I run the Installer program.
>
> Any idea how I can resolve this problem?
>
> TIA
>
> SAS
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: 23 Aug 2000 05:54:55 GMT
From: "Josiah Bryan" <jdb@wcoil.com>
Subject: ANNOUNCE: AI::NeuralNet::BackProp 0.20
Message-Id: <8nvovf$e2n$0@206.230.71.21>
Greets!
This is to announce the first public release of:
AI::NeuralNet::Mesh, version 0.20
(AI::NeuralNet::Mesh is an optimized, accurate neural network Mesh.)
This module is available for download at: (***recomended download url***)
http://josiah.countystart.com/modules/get.pl?mesh:clp.misc
This file has also entered the CPAN as:
file: $CPAN/authors/id/J/JB/JBRYAN/AI-NeuralNet-Mesh-0.20.zip
size: 44366 bytes
** What is this?
AI::NeuralNet::Mesh is an optimized, accurate neural network Mesh.
It was designed with accruacy and speed in mind. This better learning
accuracy (by twenty-three percent), as well as a much faster learning
rate and run speed over any other neural network simulater that I know
of in Perl.(*)
Included are fifteen seperate example scripts. In particular
demonstration of the accuracy and speed of this network model, check
out ex_add2.pl, ex_dow.pl, and ex_add.pl
** Got more details?
Sure do:
>From the POD:
AI::NeuralNet::Mesh is an optimized, accurate neural network Mesh.
It was designed with accruacy and speed in mind. This is a neural
net simulator similar to AI::NeuralNet::BackProp, but with several
important differences. The two APIs are the same, that of this module
and ::BackProp, so any scripts that use ::BackProp, should be able
to use this module without (almost) any changes in your code. (The
only changes needed will be to change the "use" line and the "new"
constructor line to use ::Mesh instead of ::BackProp.)
This is a complete, from-scratch re-write of the Perl module
AI::NeuralNet::BackProp. It a method of learning similar to
back propogation, yet with a few custom modifications, includeding
a specialized output layer, as well as a better descent model for
learning.
Almost all of the notes and description in AI::NeuralNet::BackProp
apply to this module, yet the differences are detailed in the POD. I
also have included a complete working function refrence in the POD,
with any necessary updates added.
** What do you think?
Now I know you people are out there that are using the module...
I can hear the fists hitting the keyboards in frustration. :-) Relieve
some of that frustration by e-mailing me and letting me know what
you think of the module and any suggestions you got.
Use it, let me know what you all think. This is just a
groud-up write of a neural network, no code stolen or
anything else. Don't expect a classicist view of nerual
networking here. I simply wrote from operating theory,
not math theory. Any die-hard neural networking gurus out
there? Let me know how far off I am with
this code! :-)
Regards,
~ Josiah Bryan, <jdb@wcoil.com>
(*) In regards to the speed claim: I only know of two neural networks
in Perl, AI::NeuralNet::Mesh (this module) and AI::NeuralNet::BackProp,
both of which I wrote. If someone else has written a neural-net in Perl
I would love to see how or what techniques you have used. I am sorry if
I have missed anybody's Perl neural-net. If I have, it was not an
intentional error on my part.
--
Josiah Bryan
VP of Product Development
TDCJ, Inc.
"Anything is possible."
vp@tdcj.com
http://www.josiah.countystart.com/
Tel: 937.316.6256
------------------------------
Date: 23 Aug 2000 06:23:44 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: ANNOUNCE: AI::NeuralNet::BackProp 0.20
Message-Id: <8nvqlg$g2g$7@slb2.atl.mindspring.net>
Josiah Bryan (jdb@wcoil.com) wrote:
: AI::NeuralNet::Mesh is an optimized, accurate neural network Mesh.
: It was designed with accruacy and speed in mind. This better learning
^^^^^^^^
Sum werds shud niver be mispeled.
(I remember a State of Illinois-printed poster at a polling place that
listed the circumstances under which a second party was allowed to
accompany a voter into the booth, one of which was that the voter was
"illerate." In another group, someone pointed out that a certain Church
of $cientology page was titled "eradictating illiteracy.")
------------------------------
Date: 23 Aug 2000 05:48:14 GMT
From: "Josiah Bryan" <jdb@wcoil.com>
Subject: ANNOUNCE: AI::NeuralNet::Mesh 0.20
Message-Id: <sq6qiaj5t91133@corp.supernews.com>
Greets!
This is to announce the first public release of:
AI::NeuralNet::Mesh, version 0.20
(AI::NeuralNet::Mesh is an optimized, accurate neural network Mesh.)
This module is available for download at: (***recomended download url***)
http://josiah.countystart.com/modules/get.pl?mesh:clpa
This file has also entered the CPAN as:
file: $CPAN/authors/id/J/JB/JBRYAN/AI-NeuralNet-Mesh-0.20.zip
size: 44366 bytes
** What is this?
AI::NeuralNet::Mesh is an optimized, accurate neural network Mesh.
It was designed with accruacy and speed in mind. This better learning
accuracy (by twenty-three percent), as well as a much faster learning
rate and run speed over any other neural network simulater that I know
of in Perl.(*)
Included are fifteen seperate example scripts. In particular
demonstration of the accuracy and speed of this network model, check
out ex_add2.pl, ex_dow.pl, and ex_add.pl
** Got more details?
Sure do:
>From the POD:
AI::NeuralNet::Mesh is an optimized, accurate neural network Mesh.
It was designed with accruacy and speed in mind. This is a neural
net simulator similar to AI::NeuralNet::BackProp, but with several
important differences. The two APIs are the same, that of this module
and ::BackProp, so any scripts that use ::BackProp, should be able
to use this module without (almost) any changes in your code. (The
only changes needed will be to change the "use" line and the "new"
constructor line to use ::Mesh instead of ::BackProp.)
This is a complete, from-scratch re-write of the Perl module
AI::NeuralNet::BackProp. It a method of learning similar to
back propogation, yet with a few custom modifications, includeding
a specialized output layer, as well as a better descent model for
learning.
Almost all of the notes and description in AI::NeuralNet::BackProp
apply to this module, yet the differences are detailed in the POD. I
also have included a complete working function refrence in the POD,
with any necessary updates added.
** What do you think?
Now I know you people are out there that are using the module...
I can hear the fists hitting the keyboards in frustration. :-) Relieve
some of that frustration by e-mailing me and letting me know what
you think of the module and any suggestions you got.
Use it, let me know what you all think. This is just a
groud-up write of a neural network, no code stolen or
anything else. Don't expect a classicist view of nerual
networking here. I simply wrote from operating theory,
not math theory. Any die-hard neural networking gurus out
there? Let me know how far off I am with
this code! :-)
Regards,
~ Josiah Bryan, <jdb@wcoil.com>
(*) In regards to the speed claim: I only know of two neural networks
in Perl, AI::NeuralNet::Mesh (this module) and AI::NeuralNet::BackProp,
both of which I wrote. If someone else has written a neural-net in Perl
I would love to see how or what techniques you have used. I am sorry if
I have missed anybody's Perl neural-net. If I have, it was not an
intentional error on my part.
--
Josiah Bryan
VP of Product Development
TDCJ, Inc.
"Anything is possible."
vp@tdcj.com
http://www.josiah.countystart.com/
Tel: 937.316.6256
------------------------------
Date: 23 Aug 2000 04:46:21 GMT
From: "Josiah Bryan" <jdb@wcoil.com>
Subject: ANNOUNCE: PCX::Loader v0.50
Message-Id: <8nvkut$7b9$0@206.230.71.21>
Announcing the first public release of PCX::Loader v0.50.
This Perl module loads native 320x200 8-bit PCX files using
pure perl code, no XS extensions or anything else.
This module is available from my website under:
http://josiah.countystart.com/modules/get.pl?pcx-loader:clp.misc
This file has also entered the CPAN as:
file: $CPAN/authors/id/J/JB/JBRYAN/PCX-Loader-0.50.zip
size: 3985 bytes
The file may take several hours to reach your nearest mirror on
the CPAN.
Regards,
--
Josiah Bryan
VP of Product Development
TDCJ, Inc.
"Anything is possible."
vp@tdcj.com
http://www.josiah.countystart.com/
Tel: 937.316.6256
------------------------------
Date: Wed, 23 Aug 2000 10:30:58 +0100
From: Alex Buell <alex.buell@tahallah.clara.co.uk>
Subject: Associative arrays
Message-Id: <0o57qs486dn57gf3fikuqm73q01t08m0l8@4ax.com>
I was playing with associative arrays like so:
%fields = ( "Member ID" => 0, "Forename" => 1, "Surname" = >2 );
print $fields{"Member ID"), "\n";
Why can't I do this:
print $fields{0); # I want to print "Member ID" but it doesn't!
My solution is to have the following:
%field_numbers = ( "Member ID" => 0, "Forename" => 1, "Surname" => 2);
%field_names = ( 0 => "Member ID", 1 => "Forename", 2 => "Surname");
Wouldn't it be cool to be able to get at the values just by doing:
print $fields{"Member ID"}; # to get 0
print $fields{0}; # to get "Member ID"
Cheers,
Alex.
--
Real UNIX programmers do it with Perl.
http://www.tahallah.clara.co.uk
------------------------------
Date: Wed, 23 Aug 2000 10:03:17 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Associative arrays
Message-Id: <slrn8q78lu.e68.rgarciasuarez@rafael.kazibao.net>
Alex Buell wrote in comp.lang.perl.misc:
>I was playing with associative arrays like so:
>
>%fields = ( "Member ID" => 0, "Forename" => 1, "Surname" = >2 );
>
>print $fields{"Member ID"), "\n";
>
>Why can't I do this:
>
>print $fields{0); # I want to print "Member ID" but it doesn't!
You can reverse a hash by doing
%values = reverse %fields;
See perldoc -f reverse
--
Rafael Garcia-Suarez
------------------------------
Date: Wed, 23 Aug 2000 07:33:31 GMT
From: Manuel Ho <mslho@my-deja.com>
Subject: breaking long lines
Message-Id: <8nvuoa$ndp$1@nnrp1.deja.com>
hi all,
i would like to ask how do i break up a long line in a perl program.
eg.
#!/usr/bin/perl
this is a line...[what-do-i-put-here?]
and this will be the same line
sorry for this stupid question.
manuel.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 23 Aug 2000 08:31:00 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: breaking long lines
Message-Id: <slrn8q72u4.16i.marcel@gandalf.local>
On Wed, 23 Aug 2000 07:33:31 GMT, Manuel Ho <mslho@my-deja.com> wrote:
>i would like to ask how do i break up a long line in a perl program.
>
>eg.
>
>#!/usr/bin/perl
>
>this is a line...[what-do-i-put-here?]
>and this will be the same line
A newline. Except for the insides of a string or a hash key or a regex
without the /x modiofier (I've probably forgotten a few), Perl doesn't
care about newlines in the source.
e.g.,
print $ENV{SHELL}
is equivalent to
print
$
ENV
{
'SHELL'
}
;
Note the quotes around the hash key, which is one of the places where
it matters.
--
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . . <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Wed, 23 Aug 2000 08:38:59 GMT
From: neil@brevity.org (Neil Kandalgaonkar)
Subject: Re: breaking long lines
Message-Id: <8o027b$aap$1@localhost.localdomain>
In article <8nvuoa$ndp$1@nnrp1.deja.com>, Manuel Ho <mslho@my-deja.com> wrote:
>i would like to ask how do i break up a long line in a perl program.
#!/usr/bin/perl -w
print print print $,=$",
@_=("whitespace and linebreaks don't", "usually
matter in", "perl syntax", "\n"), "and that's the "
. @_; print "
"
--
Neil Kandalgaonkar <neil@brevity.org>
------------------------------
Date: Wed, 23 Aug 2000 08:14:54 GMT
From: Aitor Garcia <a58289@yahoo.com>
Subject: Re: creating an enviroment variable
Message-Id: <8o015l$q2h$1@nnrp1.deja.com>
Hello again,
as you've told me I've read the Perl's faq
and I've seen that the change is not visible
to the system's shell because the shell
opens a child process whenever a perl script
is run.
But at least the next commands I execute inside
the perl script behind $ENV{"USE_NC"}=1 are
executed with my enviroment variable set to 1?
Regards,
Aitor
In article <8nujdn$6qa$1@internal-news.uu.net>,
Erik van Roode <newsposter@cthulhu.demon.nl> wrote:
> Aitor Garcia <a58289@yahoo.com> wrote:
> > Hello everybody;
>
> > I'm a Perl newbie and I've got a little
> > question.
> > I want to create a new enviroment variable
> > and set a value to it.
> > I have tried the following code but it does
> > not work.
>
> > #!/usr/bin/perl
> > $ENV{"USE_NC"} = "1";
>
> > Can anyone help me with this ?
>
> perlfaq8:
> I {changed directory, modified my environment} in a perl
> script. How come the change disappeared when I exited the
> script? How do I get my changes to be visible?
>
> Erik
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 23 Aug 2000 07:09:15 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: errno 22 1024 char limit writing to DB's
Message-Id: <8nvpqb$4re$1@orpheus.gellyfish.com>
On Tue, 22 Aug 2000 18:27:14 GMT perlnewbie@my-deja.com wrote:
> I am encountering an error when I try and write to a DB file in WinNT
> using Active Perl. Here is the error message I receive:
>
> "Tue Aug 22 09:54:07 2000: sdbm store returned -1, errno 22,
> key "92"..."
>
> It seems that I am only allowed to write a maximum of 1024 characters.
> I was wondering if there is any way to work around this limitation?
Use another DBM implementation I'm afraid - below is the table from the
AnyDBM_File manpage :
odbm ndbm sdbm gdbm bsd-db
---- ---- ---- ---- ------
Linkage comes w/ perl yes yes yes yes yes
Src comes w/ perl no no yes no no
Comes w/ many unix os yes yes[0] no no no
Builds ok on !unix ? ? yes yes ?
Code Size ? ? small big big
Database Size ? ? small big? ok[1]
Speed ? ? slow ok fast
FTPable no no yes yes yes
Easy to build N/A N/A yes yes ok[2]
Size limits 1k 4k 1k[3] none none
Byte-order independent no no no no yes
Licensing restrictions ? ? no yes no
It might be possible to obtain gdbm or bsd-db for windows - I would check
out the Activestate repository in the first place.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Wed, 23 Aug 2000 06:00:13 GMT
From: "Kevin M. Sproule" <kmsproule@worldnet.att.net>
Subject: Re: Forking in WinNT
Message-Id: <NLJo5.26162$4T.1581958@bgtnsc07-news.ops.worldnet.att.net>
<reedjd@bitsmart.com> wrote in message news:8nsjr2$s3b$1@nnrp1.deja.com...
> I'm having problems getting a forking application to work in WinNT with
> ActivePerl "This is perl, v5.6.0 built for MSWin32-x86-multi-thread"
>
> When I run the following App, I get Dr. Watson crash:
> could not attache to the application
> Windows NT Error Code = 87
>
> Code:
> my $ua = new LWP::UserAgent();
> FORK: for($requestKount=1; $requestKount <= 5; $requestKount++) {
> if($pid = fork) {
> print "$$: next FORK\n";
> next FORK;
> } elsif (defined $pid) {
> print "$$: Requesting\n";
> $requestResult = $ua->request(GET "http://www.cnn.com");
> print " $$: Got\n";
> goto DONE;
> }
> }
> print "$$: AllDone\n";
> #wait;
> sleep;
> print "$$: Done Waiting\n";
> DONE:
>
> SNIP
>
> -jr
JR,
While forking has been built into perl v5.6.0 for Win-32, it is an
"emulated" forking that uses threads instead of separate processes. From
previous posts that I have read, LWP is not thread-safe. This is the most
likely cause of your problems.
Digitally yours,
Kevin Sproule
------------------------------
Date: 23 Aug 2000 08:16:54 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Functions and reference notation.
Message-Id: <slrn8q722c.tj3.abigail@alexandra.foad.org>
Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMDXLVIII
September MCMXCIII in <URL:news:8nv1r9$2jd$1@lublin.zrz.tu-berlin.de>:
}}
}} The wavier the sea, the more you want a few beacons that seldom fail.
}} "->" is such a thing, and while I can live with it failing a little
}} more often than it used to, I don't have to welcome it.
}}
}} It is also Perlish to have "$" pretty reliably say "this is a
}} scalar", and similar for "@" and "%". You need something to hold
}} on to in a language where "(" and "{" say so little.
But $ when used in combination with -> doesn't say enough anyway.
$foo -> $method ()
returns something, but you need to look at the context to see what it is.
If you see "$something ->", you don't have enough to determine what it is.
You need to look further ahead, and after that, you might have to look at
context too.
}} When I really curse the DWIMer is when I try to make sense of
}} beginner's code.
Isn't that the "curse" of all DWIMs?
Frankly, I don't care whether beginners code makes sense or not. It's
the code of the advanced user that counts. If you want a language that's
friendly for beginners, see http://www.python.org. It's a nice language,
really. But Perl is too. And Perl no longer is Perl if we start to make
arbitrary restrictions, just to cater newbies.
We don't judge English by toddler speak either. It's the Shakespeares
that make a language shine.
Abigail
--
Build a system that even a fool can use, and only fools will use it.
------------------------------
Date: Wed, 23 Aug 2000 05:37:17 GMT
From: "Matt Kruse" <mkruse@netexpress.net>
Subject: Generalized "User Database"?
Message-Id: <hqJo5.15081$ZI2.939759@news1.rdc1.il.home.com>
Hi,
I'm looking for a generalized "user database" module or script that I can
adapt to my needs.
Basically, I want generalized user authentication/attributes functionality.
Just the back-end side of it - there doesn't need to be a front-end at all.
I will build that.
In an ideal world it would:
1) Maintain users in a flat text file
2) Store username/encrypted password as well as any number of "attributes"
for a user (first name, phone, etc)
3) Have methods to add/edit/delete users
4) Have methods to add/modify/rename/delete attribute fields for users
5) Have these methods be done in such a way that at a later time the users
could be stored in an actual database and the methods over-ridden to call
that instead of the text file.
I have 3 uses for such a thing right now, 2 of which are web-based and one
is not. I like the thought of a modular, generalized system because I can
then put it to use in a lot of different ways, with different attributes,
etc.
Any suggestions?
(I have started writing something like this already, since some searching
turned up nothing that would fit my needs, even partially... I thought this
would be common! :)
Thanks!
Matt Kruse
http://www.mattkruse.com/
------------------------------
Date: Wed, 23 Aug 2000 19:46:00 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Generalized "User Database"?
Message-Id: <slrn8q77ao.5ap.mgjv@martien.heliotrope.home>
On Wed, 23 Aug 2000 05:37:17 GMT,
Matt Kruse <mkruse@netexpress.net> wrote:
> Hi,
>
> I'm looking for a generalized "user database" module or script that I can
> adapt to my needs.
>
> Basically, I want generalized user authentication/attributes functionality.
> Just the back-end side of it - there doesn't need to be a front-end at all.
> I will build that.
>
> In an ideal world it would:
> 1) Maintain users in a flat text file
> 2) Store username/encrypted password as well as any number of "attributes"
> for a user (first name, phone, etc)
sounds like /etc/passwd with some extended GCOS information.
Alternatively, use a combination of DBI, DBD::CSV, or another file based
DBI driver. Use the crypt builtin to do password hashing stuff.
> 3) Have methods to add/edit/delete users
> 4) Have methods to add/modify/rename/delete attribute fields for users
> 5) Have these methods be done in such a way that at a later time the users
> could be stored in an actual database and the methods over-ridden to call
> that instead of the text file.
That's why I recoomend using DBI with a flat file text driver. Your
interface is independent of the backend (more or less).
> I have 3 uses for such a thing right now, 2 of which are web-based and one
> is not. I like the thought of a modular, generalized system because I can
> then put it to use in a lot of different ways, with different attributes,
> etc.
If you're going to do webbie things, you better make sure that whatever
method you use can do some proper locking or transaction based stuff. I
don't know off the top of my head if DBD::CSV does that.
> (I have started writing something like this already, since some searching
> turned up nothing that would fit my needs, even partially... I thought this
> would be common! :)
Very common. People are porting databases around all the time, and
prototyping against small, lightweight things before moving them into
Postgres, Oracle or Sybase.
Oh, there's also an Apache::DBI if you want to use mod_perl stuff.
You can find DBI and its drivers both on www.cpan.org and on
http://www.symbolstone.org/technology/perl/DBI
Martien
--
Martien Verbruggen |
Interactive Media Division | The gene pool could use a little
Commercial Dynamics Pty. Ltd. | chlorine.
NSW, Australia |
------------------------------
Date: Wed, 23 Aug 2000 03:55:42 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Hashref infix misunderstood?
Message-Id: <39a4499e.3692501@news.newsguy.com>
soren@spmfoiler.removethat.wonderstorm.com (Soren Andersen)
wrote:
>I am not even going to answer the pedant who wasted enormous bandwidth starting
>with ranting about "use strict". I'll "use strict" if I want to. And I am not
>interested in anybody's "points" system. I code for love of it, not for esteem
>in the eyes of others (ego).
The reference to points was a joke -- no one's keeping score.
But if you read this group long you'll see that many of the
problems with people's scripts are typos and other things that
"use strict" and "-w" would have made obvious. It's much better
to give Perl a chance to tell you about mistakes than to post
your program to a newsgroup and have them pointed out. If you
don't want help with your code, then don't post it.
Your attack on people who tried to help makes it a lot less
likely that people on this newsgroup will help you in the
future, and unfortunately any apologies won't be seen by people
who've already killfiled you.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 23 Aug 2000 10:03:44 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Hashref infix misunderstood?
Message-Id: <8o07i0$3os$1@lublin.zrz.tu-berlin.de>
Soren Andersen <soren@spmfoiler.removethat.wonderstorm.com> wrote in comp.lang.perl.misc:
>kcivey@cpcug.org (Keith Calvert Ivey) wrote in
><39a88016.49085414@news.newsguy.com>:
[...]
>I am not even going to answer the pedant who wasted enormous bandwidth starting
>with ranting about "use strict".
You aren't? To me it looks like you are. I guess it's easier to make
up things when the text you are complaining about isn't in sight. The
"enormous bandwidth" I wasted is a single-line-rant about the lack of
use strict (and the presence of -w).
> I'll "use strict" if I want to.
Certainly. But if you post your code here because it doesn't work,
you will have to put up with critique if you don't use the available
means to make it work. It just takes so much more time to check a
non-strict source for errors.
> And I am not
>interested in anybody's "points" system. I code for love of it, not for esteem
>in the eyes of others (ego). There are a whole buncha attitudinal things that
>have gone incredibly too far in this Perl ng psuedo-world. Bunches of wannabee
>teachers who arrogantly pontificate instead of (if they see it) just pointing
>out what isn't working and why.
Have you even read my posting? I pointed out one gross inefficiency
in your program and an error that will make it fail, except when its
current directory is such that it mysteriously works, both with clear
explanations. I overlooked another serious error and disregarded two
dubious lines (a print statement with side effects, and a warning in
a "can't-happen" situation), pedant that I am. Dammit, I spent *time*
with your posting, probably more than you took preparing it.
> God, it takes all kinds I guess. But my advice
>to new participants: don't emulate what you see going on here. And
>fundamentally don't rely on a ng to learn how to code Perl. Mostly these fora
>are about people expressing their cramped neurotic personalities; good books or
>classes (stuff you pay for) are a better way to learn to program Perl.
Note that most authors of good Perl books, as well as some of the most
renowned teachers of Perl classes, are among the neurotic personalities
who, at least occasionally, express their opinions here.
I love it when someone who has never contributed much, if anything,
barges in elaborating his opinion of what's wrong with the newsgroup.
Opinions are like assholes. Everybody has one, and they all stink.
Of course you are entitled to yours.
Anno
------------------------------
Date: Wed, 23 Aug 2000 06:04:55 GMT
From: nidhi_naith@my-deja.com
Subject: Re: Help: Excel Automation question!
Message-Id: <8nvpi0$hbv$1@nnrp1.deja.com>
visit the given below link to get more details about
Win32::OLE:
http://www.crystaltech.com/perldocs/lib/site/Win32/OLE.html
courtesy(www.qsupport.com)
In article <8nqdng$agc$1@nnrp1.deja.com>,
ajeet@my-deja.com wrote:
> Dear all,
>
> I am trying to use Win32::OLE to extract data from a MS Excel sheet.
> Once, I open the workbook, I do this to access the values:
> $worksheet = $workbook->Worksheets($sheetNo);
> $thisref = $worksheet->Range("A4:A24")->{'Value'};
>
> I have no problem with this, but it returns the exact values in the
> cells A4:24. What I NEED are the FORMATTED values in the cells. The
> documentation for the module says that I can access the TEXT-ONLY
using
> this:
> $thisref = $worksheet->Range("A4:A24")->{'Text'};
>
> But, all I get is an empty array. Anyone, who's done this before,
could
> please help me? Thank you very much!
>
> Cheers
> Ajeet
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 23 Aug 2000 08:56:45 +0100
From: nobull@mail.com
Subject: Re: how can I use perl to get a website?
Message-Id: <u9hf8cjqk2.fsf@wcl-l.bham.ac.uk>
"Wang FeiYun" <feiyun-arthur.wang@nokia.com> writes upside down and
quote the entirity of my post despite the fact that none of it is
actually relevant to his question.
He even quotes the bit:
> <nobull@mail.com> wrote in message news:u9r97hjjzi.fsf@wcl-l.bham.ac.uk...
> > Please qoute only relevant parts of the post you are replying to and
> > qoute them _before_ your reply. If you can't play nice, then please
> > go play elsewhere.
Please go away and do not come back here until you've learned some
manners.
> In the CPAN,in the directory LWP, there are many modules in it. Which one
> should I use.
If you look carefully you'll see they are almost all in one
distribution and if you simply install LWP you get all almost all of
the LWP:: and HTTP:: modules.
> I click the "install module" by reponse a error.
I have never use a point and click interface to CPAN, and even if I
had you've not bothered to tell me _what_ error you get.
> How can install the module.
perl -MCPAN -e 'install("LWP")'
If you get an error then fix whatever is causing the error.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 23 Aug 2000 08:21:36 GMT
From: abigail@foad.org (Abigail)
Subject: Re: how convert to binary, hex etc
Message-Id: <slrn8q72b6.tj3.abigail@alexandra.foad.org>
Samuel Irlapati (samuel.irlapati@unisys.com) wrote on MMDXLVIII September
MCMXCIII in <URL:news:8nujjc$ipe$1@trsvr.tr.unisys.com>:
-: How do you convert a decimal number say to hexadecimal and then shift it by
-: one digit to the right and then convert it back to decimal?
$num = do {local $_ = sprintf "%x" => $num; chop; hex};
Abigail
--
:;$:=~s:
-:;another Perl Hacker
:;chop
$:;$:=~y:;::d;print+Just.$:
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 4102
**************************************