[10988] in Perl-Users-Digest
Perl-Users Digest, Issue: 4588 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 8 11:07:22 1999
Date: Fri, 8 Jan 99 08:00:18 -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 Fri, 8 Jan 1999 Volume: 8 Number: 4588
Today's topics:
Re: "internal server error" (John Moreno)
Re: a couple of beginner questions here. <ludlow@us.ibm.com>
Re: Can I execute Perl Scipt from VB ? dave@mag-sol.com
Re: comp/comp3 numbers in Perl or maybe C ()
DBM Berkeley DB version 2.x automatic filelock? (2n3055@usa.net)
Re: extract MULTIPLE form data dave@mag-sol.com
Re: If Larry Wall's listening out there.... (Clinton Pierce)
Re: More efficient way to program this? Maybe Daemon? <jdf@pobox.com>
Re: Not Quite FAQ: perl for Win32 w/out console <tripp.lilley@perspex.com>
Re: Perl Criticism <tchrist@mox.perl.com>
Re: Perl Criticism (Bart Lateur)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 8 Jan 1999 10:58:10 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: "internal server error"
Message-Id: <1dlb79c.1j84ay0134665gN@roxboro0-014.dyn.interpath.net>
Tony Greenwood <paxton@cyberstrider.org> wrote:
> ** CyberSTrider Web Services http://web.cyberstrider.net **
>
> Hey! abigail@fnx.com (Abigail)
>
> >__ I've just started learning Perl and I recently modified a CGI-skripy,
> >__ but now it won't work and I don't know why. Would someone be as kind
> >__ as to rund it un their Unix shell (I don't have Unix) and tell me
> >__ which line makes the error.
> >
> >
> >Let's see.... you don't have -w, you don't have "use strict", you do
>
> Niether do I.. what do they do ?
Gives warning message on suspect code and enforces a stricter syntax.
> >everything yourself instead of using modules written by people with a
>
> Same here.. I still don't understand what a module is or how to use
> them
"use" them and then call their functions, fairly simple.
> >clue, you don't supply us with an error message, nor you clarify what
>
> I get errors but no error messages, as I write in notepad then where
> would I find error messages?
Not using a Windows machine I can't help you with this.
> >"don't work" is, and you don't have the appropriate environment to test
> >your work with.
>
> I "think" I have the appropriate enviroment though so I am one up on
> the original poster :)
Trying to learn perl by doing CGI programming (especially for someone
with no programming experience) is like trying to learn to ride a
unicycle by practicing on a tight rope -- not conductive to anything
except a quick crash and burn.
> >Please crawl under a rock and wither away. You make me sick.
>
> Hmm not the best sig I ever came accross...
Not a sig or it would have been preceded by a proper sigdash (two dashes
followed by a single space on an otherwise blank line).
> .
> BTW it isn't sarcasm.. I really don't know the answers to the above..
> .
Then you need to read some more.
> Cheers.....!ynoT
> CyberSTrider Web Services
> http://web.cyberstrider.net
You seem to be missing a sigdash, would you like to borrow one?
--
John Moreno
------------------------------
Date: Fri, 08 Jan 1999 09:35:22 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: a couple of beginner questions here.
Message-Id: <369625BA.DE90C2C9@us.ibm.com>
Wayne wrote:
> Just learning Perl and have 2 questions:
It sounds like you're on the right track, and you could really benefit
from some basic instruction. Have you read Learning Perl yet? If not,
then it would be a good first step. Go through the book, and work
through every example. After that, you could answer both of your
questions easily. There's a Unix and a Win32 version of the book (I
haven't read the Win32 version so I can't say if it's as good or not,
but I have no reason to believe that it would be inferior.)
Some other things that are sure to help...
- the documentation that came with perl.
- the faq (also came with perl, and it's on the web).
- The Camel Book (Programming Perl).
- CGI.pm - I have this feeling that you're not using it.
- -w and "use strict;".
- the debugger (-d). You can use not only for debugging, but also for
just trying things out, and seeing what perl is doing to your data. For
instance, if you want to see how a hash or some complex data structure
is stored, you can look at it with the debugger. It's a great tool to
use for answering "what if" questions. Programming Perl covers the
debugger in chapter 8. It looks kind of scary at first, but it's really
worth while to learn how to use it.
I know that this does nothing to immediately answer your questions, but
I think that in the long run you'll be better off if you answer those
two yourself.
Good luck.
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: Fri, 08 Jan 1999 14:48:06 GMT
From: dave@mag-sol.com
Subject: Re: Can I execute Perl Scipt from VB ?
Message-Id: <7755r5$457$1@nnrp1.dejanews.com>
In article <774gia$p49$1@m2.c2.telstra-mm.net.au>,
"Barry G. Sumpter" <bsumpter@msn.com.au> wrote:
> This is a multi-part message in MIME format.
Plaase don't do that. Usenet is a *text* medium.
> Colleagues,
>
> I'm currently working with two very intelligent ClearCase experts.
> They both swear by perl and have developed extensive custom automation =
> perl script for ClearCase.
>
> However, 90% of our development work is in VB and a lot of supporting =
> apps are in exchange/outlook forms using VBScript and VBA. The other =
> 10% being C++.
>
> We would love to be able to execute Perl scripts using VB / VBScript / =
> VBA / C++.
>
> Does anyone know of an activex control either a .dll or .exe or .ocx =
> that would
> allow us to do this?
I've not used VB since I saw the light many years ago, but I'd be very
surprised if it didn't support some kind of 'system' command to run external
programs. What's to stop you using that to call your Perl scrits?
--
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
------------------------------
Date: 8 Jan 1999 15:20:43 GMT
From: docdwarf@clark.net ()
Subject: Re: comp/comp3 numbers in Perl or maybe C
Message-Id: <7757ob$gt8$1@callisto.clark.net>
In article <773h41$o4c$1@nnrp1.dejanews.com>, <aixgod@ix.netcom.com> wrote:
>Wow, I knew someone was going to be able to help me with this - you guys
>rule. Ok, I'm guilty of not giving enough information up front.
>
>I'm starting on AIX version 4 on an RS/6000 (which is PowerPC 604 I think).
>I'll make my data file from there using Perl (the pack function) and then
>I'll ftp it up to the mainframe, which is an Amdahl. I believe it's running
>OS/390. I think PowerPC chips support either little or big endian operation
>(maybe) so I don't really know what AIX does....I think it's big endian but
>I'm not sure.
Hold it right there, please. Translating packed/binary numbers across
platforms is an... intricate exercise, to say the least; some of the
comments you've received here might have indicated this.
Translating display numerics (X'F0' - 'X'F9' in EBCDIC, X'30' - X'39') is
child's play and it is likewise an elementary exercise to write a program
to 'comp down' fields; this leads to the sugesstion of:
AIX side:
Extract data.
Convert data to display numeric format with sign indicator, leading or
trailing.
FTP file, AIX ==> Amdahl
Amdahl side:
Convert data from display numeric w/ sign indicator to desired packing
method.
Program/utility to load data appropriately.
If, however, there is resistance - and there are both strong reasons and
traditions why there might be - on the mainframe side to structuring the
job in this manner then you need someone in a corner office to say 'Do
This'.
DD
------------------------------
Date: Fri, 08 Jan 1999 14:31:05 GMT
From: 2n3055@usa.net (2n3055@usa.net)
Subject: DBM Berkeley DB version 2.x automatic filelock?
Message-Id: <36971179.43977068@news.supernews.com>
I have read something in Berkeley DB homepage,
http://www.sleepycat.com/faq.html#A10
it told that Berkeley DB done filelock automatically, but not in 1.85,
http://www.sleepycat.com/historic.html
therefore,
we don't need to consider any filelocking issue when dealing with
Berkeley DB?
anybody can confirm it for me?
how about BerkeleyDB stability with the Perl Module interface?
BTW, SDBM good or not?
filelock automatically or need extra line?
------------------------------
Date: Fri, 08 Jan 1999 14:43:20 GMT
From: dave@mag-sol.com
Subject: Re: extract MULTIPLE form data
Message-Id: <7755i8$3va$1@nnrp1.dejanews.com>
In article <3695C569.AE83B0EC@workmail.com>,
Michael Reutter <mw@workmail.com> wrote:
> I use this code to see what data my forms send to my cgi-script:
> ---------cut-----------
> @pairs = split(/&/, $buffer);
> foreach $pair (@pairs)
> {
> ($name, $value) = split(/=/, $pair);
> $value =~ tr/+/ /;
> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> $value =~ s/~!/ ~!/g;
> $value =~ s/\r/\n/;
> $FORM{$name} = $value;
> }
> }
> print "Content-type: text/html\nExpires: Thu, 01 Dec 1994 16:00:00
> GMT\n\n";
> print "<HTML><HEAD><TITLE>DATA</TITLE></HEAD><BODY><PRE>\n";
> foreach $key (sort keys(%FORM)) {
> print "$key=$FORM{$key}\n";
> }
> ---------cut-----------
>
> but what will I have to do if I want to see data sent by
>
> <select name="flavors" MULTIPLE>
> <option value="pistachio">Pistachio
> <option value="walnut">Walnut
> <option value="creme">Creme
> </select>
>
> I will always see the last selection (if selected walnut AND creme, I
> will only see creme 'cause creme overwrites walnut!)
> Yes, if I expect a specific key like "flavors", I can handle it, but
> what if I want to do it flexible, so that the perl script recognizes, if
>
> that value is a MULTPILE or a "single" value?
> If the script gets a multiple value, I want it to pritn something like:
>
> flavors (multiple):
> walnut
> creme
>
> is this possible???
Yes. CGI.pm handles multiple valued parameters without problems. You sohlud be
using it for all your CGI scripts.
Dave...
--
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
------------------------------
Date: Fri, 08 Jan 1999 14:21:39 GMT
From: cpierce1@mail.ford.com (Clinton Pierce)
Subject: Re: If Larry Wall's listening out there....
Message-Id: <369a13ed.2755756505@news.ford.com>
On Fri, 08 Jan 1999 08:48:03 -0500, Tripp Lilley
<tripp.lilley@perspex.com> wrote:
>Daniel Grisinger wrote:
>BTW: While you're at it, I'd like you to do a feasibility study on migrating
>our shop from IP over Carrier Pigeon to something a little more modern. I've
>heard good things about this new IP over Morse Code...
Oh you've got it all wrong. The newest technology is VPN. Basically
you tunnel your Morse-encoded IP through smoke signals. Your building's
ventillation system takes care of propogation. No messy wires to run.
To connect to the Internet, simply cut a hole in the roof.
------------------------------
Date: 08 Jan 1999 16:16:26 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: nkaiser@my-dejanews.com
Subject: Re: More efficient way to program this? Maybe Daemon?
Message-Id: <m3zp7tu75h.fsf@joshua.panix.com>
nkaiser@my-dejanews.com writes:
> while (1) {
> &handleTypeA;
> &handleTypeB;
> .. etc
sleep(60); # give back the CPU for a minute
> }
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Fri, 08 Jan 1999 09:59:37 -0500
From: Tripp Lilley <tripp.lilley@perspex.com>
Subject: Re: Not Quite FAQ: perl for Win32 w/out console
Message-Id: <36961D59.3EE8BF3E@perspex.com>
Jeffrey Drumm wrote:
> If you're talking about NT, have you looked at the parameters for the START
> command? I'm not at my NT system at the moment, but I believe you can run a
> console app in a hidden window. At the very least you can run it minimized
> with the /MIN flag:
start /B perl foo.pl
This runs the script without spawning a new shell window, but it assumes that
you've already an instance of cmd.exe from which to run it :-) Since cmd.exe is
itself a console mode app... Anyway, I don't know if I provided the context,
but this is a case in which the scripts are being called from another program
that has its own GUI. Since there's no cmd.exe context from which to 'start',
and no way I saw in cmd /? to spawn cmd.exe without an actual console, I
suppose I'm going to write the wrapper.
Grumble.
Thanks for the pointers.
------------------------------
Date: 8 Jan 1999 15:06:08 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Criticism
Message-Id: <7756t0$1ob$1@csnews.cs.colorado.edu>
In comp.lang.perl.misc, raoul@xenon.triode.net.au writes:
:The set of scripting languages is a subset of the set of programming
:languages. The set of compiled languages is a subset of the set of
:programming languages. The set of functional languages is a subset of
:the set of programming languages.
As has been pointed out before, those are not well-defined sets, nor
are they in any fashion non-overlapping. It also doesn't matter much.
People are just looking for labels they might use to conveniently put
someone else down with.
All programming languages are interpreted, you know.
--tom
--
X-Windows: Japan's secret weapon.
--Jamie Zawinski
------------------------------
Date: Fri, 08 Jan 1999 15:29:43 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl Criticism
Message-Id: <36972405.4163809@news.skynet.be>
On 08 Jan 1999 09:52:01 -0500, Marc Evelyn wrote:
>Oh you should read some of his writings in other USENET groups, say
>comp.object, and in other fora before making him an ally of Python!
My, my.... George Reese?
Bart.
------------------------------
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 4588
**************************************