[13150] in Perl-Users-Digest
Perl-Users Digest, Issue: 560 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 16 22:07:45 1999
Date: Mon, 16 Aug 1999 19:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 16 Aug 1999 Volume: 9 Number: 560
Today's topics:
Re: Beginner. Perl on NT (Michael James OConnor)
Re: Beginner. Perl on NT (elephant)
Re: CGI.pm or here document for html <makkulka@cisco.com>
Re: Creating hotlinks out of plain URLs in Perl. <All@n.due.net>
Re: Help !! DBD::Oracle (John D Groenveld)
Help a newbie. Please. johndankey@my-deja.com
Re: Help a newbie. Please. (elephant)
how can i switch to perl5 <proneone@cyberonic.com>
Re: How to view code as text in working cgi script <phony@nospam.com>
Re: How to view code as text in working cgi script <erict@cc.wwu.edu>
image changes in HTML files (Jana Cole or John Sayre)
Re: Killing Processes on NT... (elephant)
Re: Pattern matching on command line (elephant)
Re: Perl Services <flavell@mail.cern.ch>
Re: Perl vs. ASP: which is better? (Tom Dominico, Jr.)
sending text fields with ENCTYPE="multipart/form-data" (Dico Reyers)
Re: Storing data from each column of each line in a has <uri@sysarch.com>
Re: Storing data from each column of each line in a has <Joe.Kline@sdrc.com>
Re: Strange trouble with a STRAY CURLY BRACE "}" (Filip M. Gieszczykiewicz)
Re: unCRAP (was Re: Perl Services) <elaine@chaos.wustl.edu>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 17 Aug 1999 01:13:55 GMT
From: ltcdrmikej@aol.comno.spam (Michael James OConnor)
Subject: Re: Beginner. Perl on NT
Message-Id: <19990816211355.12366.00001038@ng-fs1.aol.com>
Well, without more information, it's kind of hard to tell. However, it's likely
that your server isn't set up to handle Perl CGI. As far as I know, IIS doesn't
support Perl by default. If you're running IIS, that may be the problem. Also,
it's good for portability to include the shebang (the #!/usr/bin/perl at the
top), but you really don't need it for NT.
-Mike-
------------------------------
Date: Tue, 17 Aug 1999 11:15:45 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Beginner. Perl on NT
Message-Id: <MPG.122362c97ad65dc3989c34@news-server>
Peter Tilsted writes ..
>Why does this not work, running the perl script locally alone works fine
>(perl hello.pl) but not on the server.
>
>i hope someone can help, and if it is just a matter of reading som FAQ,
>please direct me to it, and accept my apologies for this mail
it's in perlfaq9 "My CGI script runs from the command line but not the
browser." .. i found this with the following command from the command
line (works on both UNIX and NT)
perldoc -q "CGI.*command.?line"
hint: at the very least - you're missing the Content-type line from your
script
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Mon, 16 Aug 1999 18:24:50 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: CGI.pm or here document for html
Message-Id: <37B8B9E1.8DB0FFC@cisco.com>
[
support@gethits.com wrote:
> I'm considering converting
> to CGI.pm to generate web documents, but I'm
> wondering if it's worth it.
Using CGI.pm merely for replacing your HERE docs may not
be such a good idea. HTML with a lot of decorative tags and
javascripts embedded here and there is a good candidate to
emit using HERE docs as you are already doing. Replacing
such 'complex' HTML with methods from CGI.pm would
make the code almost as complex and cryptic.
But consider the situation where the HTML has to generated
programatically
once the program has the results ready. A simple example would be
a HTML table display for an array or arrays with each even rows in
green and odd rows in yellow. A HERE document would be difficult
to use here - more so with dynamic number of rows.
Bottomline - use CGI.pm but not merely as replacement for HERE docs.
--
------------------------------
Date: Tue, 17 Aug 1999 00:08:23 GMT
From: "Allan M. Due" <All@n.due.net>
Subject: Re: Creating hotlinks out of plain URLs in Perl.
Message-Id: <XJ1u3.15279$C6.158956@news2.rdc1.on.home.com>
Abigail <abigail@delanet.com> wrote in message
news:slrn7regf5.81j.abigail@alexandra.delanet.com...
[snip]
: $text =~ s {(
: (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.
: )*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=+])*))*)?))|(?:(?:(?:(?:(?:[a-zA-
: Z\d\$\-_.!~*'(),])|(?:%[a-fA-F\d]{2})|[:@&=+])*)(?:/(?:(?:(?:[a-zA-Z\d
: \$\-_.!~*'(),])|(?:%[a-fA-F\d]{2})|[:@&=+])*))*)?)))
: )}{<a href = "$1">$1</a>}xg;
:
: print $text;
I can only say: WOW.
We are not worthy.
That is just so much fun, someone - anyone, show me code in another language
that is so ... what can I say ... I have no words in English. That is just
plain whacky, yet functional. It is like learning that Mathematics
actually, really works. Thanks for making my day.
AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--Random Quote--
'Help save the world!'
Larry Wall in README
------------------------------
Date: 16 Aug 1999 20:29:56 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Help !! DBD::Oracle
Message-Id: <7paae4$i0f$1@grolsch.cse.psu.edu>
In article <7p9531$a4v$1@news.iss.net>,
njj <njjones@compuserveNOSPAM.com> wrote:
>Is anyone successfully using the Perl DBI interface for Oracle ? I am being
Many, many people. Supposedly two of the more popular CPAN downloads.
>driven mad by it and would appreciate hearing from anyone who is
>successfully using it.
perldoc DBI, perldoc DBD::Oracle, perldoc Oraperl, more README.*
>In particular I have not been able to get a stored procedure to execute and
>would appreciate seeing some working examples.
Theres some examples in test code.
Here's an example of returning a cursor.
http://www.xray.mpe.mpg.de/mailing-lists/dbi/1999-07/msg00675.html
John
groenveld@acm.org
------------------------------
Date: Tue, 17 Aug 1999 01:16:06 GMT
From: johndankey@my-deja.com
Subject: Help a newbie. Please.
Message-Id: <7pad4e$2ad$1@nnrp1.deja.com>
I'm new to Perl and trying to adjust a certain shopping cart program.
The following code:
If ($FORM{'country'} eq 'US') {
$c = 1;
$aca = 10;
}
gives me a syntax error on the line with the $aca variable. Please,
God, what am I doing wrong? (Besides denting the wall with my forehead
the past five hours?
Thanks.
Dan
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 17 Aug 1999 11:57:39 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Help a newbie. Please.
Message-Id: <MPG.12236ca2454611c7989c36@news-server>
johndankey@my-deja.com writes ..
>I'm new to Perl and trying to adjust a certain shopping cart program.
>The following code:
>
> If ($FORM{'country'} eq 'US') {
> $c = 1;
> $aca = 10;
> }
>
>gives me a syntax error on the line with the $aca variable.
the 'if' statement is spelt 'if' and not 'If'
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Mon, 16 Aug 1999 21:38:45 -0400
From: bishar fambrough <proneone@cyberonic.com>
Subject: how can i switch to perl5
Message-Id: <37B8BD1A.80CC262F@cyberonic.com>
hi -
i'm a pretty decent perl 4 programmner, but i need to make the switch
to perl 5 in a hurry. can anyone give me some pointers as to the
fastest and most painless way this can be achieved? i'd love to be
pointed to some online docs if at all possible.
- thanx
------------------------------
Date: 17 Aug 1999 01:23:17 GMT
From: "Bart Simpson" <phony@nospam.com>
Subject: Re: How to view code as text in working cgi script
Message-Id: <7padi5$1ap$0@216.39.133.142>
> > // How can I call a cgi program on the web to see it's code? Is there a
> > // way to do this? Any adjustments I can do to my browser?
> >
> > No, you cannot steal CGI programs that way.
>
> I wasn't planning on it.
>
> You should really get a little more info before accusing someone. Just
> because I want to SEE the code doesn't mean I'm going to steal it. And
> who's to say I'm not doing some sort of experiment and the script in
> question is on my own server.
>
If the script in question is on your own server, then you could just log in
and view it. You cannot SEE the code, because than anyone could SEE the
code, and it could be stolen.
Once you SEE the code, you cant un-SEE it, so its already been stolen once
you've SEEn it.
> You see, think before you speak.
>
She did think. (but she didn't SEE)
------------------------------
Date: Mon, 16 Aug 1999 18:22:54 -0700
From: Eric Turner <erict@cc.wwu.edu>
Subject: Re: How to view code as text in working cgi script
Message-Id: <37B8B96E.8D168214@cc.wwu.edu>
Warren Bell wrote:
>
> How can I call a cgi program on the web to see it's code? Is there a
> way to do this? Any adjustments I can do to my browser?
>
> Can you do this with Unix, I've got wget and lynx?
>
> --
> ####### Remove ERASE to reply #######
A script or program is run on the server, and output (usually html
and/or JavaScript) is sent via the CGI to the web browser. The browser
will never see what's going on behind the scenes, only what the server
sends it. The browser then interprets what it receives. Note the
distinction between server-side and client-side scripting.
You could request copies of the script(s) from the author(s), if they
are willing.
I've written and compiled C++ programs that send web content via CGI to
the web browser. If the code you're interested in was purchased from a
third party already compiled, then even the owners of the web site may
not know how portions of the site work!
The question you ask isn't specifically a Perl question, so you should
probably post future CGI-related questions to
comp.infosystems.www.authoring.cgi.
Cheers,
Eric Turner
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
You can send something to me securely by encrypting it using PGP.
My public PGP key is available from hkp://keys.pgp.com/erict@cc.wwu.edu
Free PGP software is available from http://bs.mit.edu:8001/pgp-form.html
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
------------------------------
Date: Tue, 17 Aug 1999 00:22:38 GMT
From: quikscor@ix.netcom.com (Jana Cole or John Sayre)
Subject: image changes in HTML files
Message-Id: <37b8aae4.34483891@nntp.ix.netcom.com>
I've heard you can write a script to change images in an HTML file so
you don't have to redo the HTML. You change the code in another file
somewhere. I'd like to see some code that does this. Anybody know of
some posted on the net or in a book that I could look at? Or can
someone just explain to me how it's done?
- j
------------------------------
Date: Tue, 17 Aug 1999 11:30:09 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Killing Processes on NT...
Message-Id: <MPG.1223662d1fc46516989c35@news-server>
Manoj Shenoy writes ..
> I am trying to kill
>a PERL process on NT using the %SIG signal handler hash.
could have deleted everything except the words "signal" and "NT" from
this article
directly from the VERY FIRST Win32 FAQ (Introduction) from ActiveState's
distribution
"
Signal handling may not behave as on Unix platforms (where it doesn't
exactly ``behave'', either :). For instance, calling die() or exit()
from signal handlers will cause an exception, since most implementations
of signal() on Win32 are severely crippled. Thus, signals may work only
for simple things like setting a flag variable in the handler. Using
signals under this port should currently be considered unsupported.
"
learn how to read the Win32 FAQs .. you might not be as surprised when
things don't work .. there are quite a few things to look out for when
moving scripts from UNIX to Win32
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Tue, 17 Aug 1999 11:10:14 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Pattern matching on command line
Message-Id: <MPG.1223618337eecce3989c33@news-server>
tyeung@netscape.net writes ..
> I am a new Perl programmer.. and learning by myself. I would like to
>know in Perl pattern matching expression.. /b /B /i /g /m etc..
>Can I do the pattern matching on the command line??
you really only needed to ask once btw
>For example:
>
>on the command line:
>perl program m/word/i < inputfile
basically what you're asking is whether you can pass a piece of code
into your script from the commandline and have the script operate on it
as code .. the answer is yes .. but not as simply (or as incorrectly) as
you have done below
>in the program:
>if ($string =~ @ARGV)
this will not do what you think .. @ARGV is being evaluated in a scalar
context .. for what is returned when you evaluate an array in a scalar
context check out
perldoc perldata
what you will actually have to do is construct a string of what you want
executed and pass it to the eval() function .. and you'll want to use
something like $ARGV[0] to grab the first command line argument instead
of what you have above .. and be careful of which variables you want
interpolated in the eval string and which ones you do not
check out
perldoc -f eval
for more information on the eval() function
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Tue, 17 Aug 1999 02:08:34 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl Services
Message-Id: <Pine.HPP.3.95a.990817015530.24043B-100000@hpplus03.cern.ch>
On 16 Aug 1999, revjack wrote:
> :> > print "Content-type:text/html\n\n";
> :>
> :> what did you not particularly like about that?
>
> :At a guess, the missing space after the :.
>
> This has always puzzled me. Where in the RFC(s) is it indicated that that
> space is mandatory?
On the contrary: there _is_ no RFC (yet) about the CGI. (IINM!).
As I read the _HTTP_ RFC (2616), no space is required after the colon.
But this is not HTTP that we're speaking here, it's CGI. So the
question (which to my mind is still open) as to whether a space is or is
not required there, would have to be laid down in the CGI spec.
The nearest thing I know to that is the Internet Draft from Ken Coar,
where this seems to be the salient section:
7.2.1. CGI header fields
The CGI header fields have the generic syntax:
generic-field = field-name ":" [ field-value ] NL
field-name = token
field-value = *( field-content | LWSP )
field-content = *( token | tspecial | quoted-string )
That seems to make the intentions clear. How about compatibility with
the existing implementations, though?
all the best
------------------------------
Date: Mon, 16 Aug 1999 17:05:59 -0700
From: news@tomd.SPAMfree.org (Tom Dominico, Jr.)
Subject: Re: Perl vs. ASP: which is better?
Message-Id: <MPG.1222474734a055b2989680@news.netasset.com>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <7p2m3j$nee$1@news.fsu.edu>, delcasti@cs.fsu.edu says...
> I'm the opposite of yourself. I have lots more experience with PERL...
> My biggest beef with ASP so far is that if I were in PERL, I could write
> one .pl file that could handle all requests and output. In ASP, I have to
> write multiple ASP pages resulting in much duplication. Is this correct,
> or am I confused once again with the whole MS-VB-ASP-AEIOU *stuff*?
Well... You could stuff a lot of conditional logic into one page, use
session variables/cookies/hidden fields to hold data over the session,
and make one page multi-functional... I have done this (to an extent)
on occasion, but this would most likely end up in a very garbled page
(code-wise). I do know for a fact that if your ASP's have too many
lines, you will suffer major performance hits. It is recommended that
any commonly-used logic be encapsulated in a component (either a .dll or
.exe) that can be called from the page, simplifying your life immensely.
Personally, I am becoming a big fan of Perl/CGI just because Perl has so
much functionality, before you even resort to modules, etc.
But anyway, back to your original question... Yes, you very well may
find yourself doing a lot of duplication to keep your pages clean. Not
knowing a great deal of Perl, it's hard for me to compare, but from what
little I have seen, Perl/CGI has much more base functionality/power. To
match this in ASP, you will have to resort to a lot of components...many
of which are *NOT* free. Can't just head over to CPAN, like you can for
Perl... Hope this has been marginally enlightening.
------------------------------
Date: Tue, 17 Aug 1999 00:41:23 GMT
From: dico@internetworks.ca (Dico Reyers)
Subject: sending text fields with ENCTYPE="multipart/form-data" and PERL
Message-Id: <37b8b224.3789556@news.attcanada.net>
Hello There,
I am trying to have people fill out a form that has both text
fields, check boxes, radio buttons, etc and a file upload section.
When I add ENCTYPE="multipart/form-data" to the FORM tag the script
fails. However when I delete that part everything works fine (with
the exception of the file upload). On it's own the file upload
portion works. I'd like to get them to work together.
Any suggestions?
Thanks,
Dico
------------------------------
Date: 16 Aug 1999 20:09:34 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Storing data from each column of each line in a hash.
Message-Id: <x7wvuv1d4x.fsf@home.sysarch.com>
>>>>> "JK" == Joe Kline <Joe.Kline@sdrc.com> writes:
JK> Josh Goodman wrote:
JK> I prefer chomp over chop, just removes newlines.
just removes $/ (if it ends the string) which defaults to newline
>> = split(' ',$_,15);
JK> @elements = split(/' '/, $_);
??? is the input really separated by q{' '}?
be careful with those regex things. they will byte you.
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
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Mon, 16 Aug 1999 20:45:38 -0400
From: Joe Kline <Joe.Kline@sdrc.com>
Subject: Re: Storing data from each column of each line in a hash.
Message-Id: <37B8B0B2.B5E548B2@sdrc.com>
Uri Guttman wrote:
> <SNIP>
> JK> @elements = split(/' '/, $_);
>
> ??? is the input really separated by q{' '}?
>
> be careful with those regex things. they will byte you.
I forgot to proof that bit of the code snippet, wasn't sure if he had ' ', or
''.
joe
--
/===================================================\
| Joe Kline | I used to be |
| | anonymous - Anon|
\===================================================/
------------------------------
Date: 17 Aug 1999 00:15:31 GMT
From: fmgst+@pitt.edu (Filip M. Gieszczykiewicz)
Subject: Re: Strange trouble with a STRAY CURLY BRACE "}"
Message-Id: <7pa9j3$75m$1@usenet01.srv.cis.pitt.edu>
In Article <7p1h04$44a$1@nnrp1.deja.com>, through puissant locution, jsilve1@my-deja.com soliloquized:
>I have this script, it may or may not matter what it does, I don't
>know, but I'll sum up as follows:
>script basically just prints stuff out to the screen. there are a
>couple of subroutines to print out header and footer info.
>when testing the script, i get a syntax error "missing right bracket
>at script_name line..." basically saying that i need a closing "}"
>at the end. no biggee, right? just put a close brace on (which i did)
>and it should work fine, right? Well it did.
>See, the thing is that there is no matching open curly brace for this
>close curly brace!!
>I use the Vi editor. Vi has a key command (%) which shows matching
>braces, parens, or brackets by jumping back and forth between them.
>but on this brace it just beeps, indicating a stray curly brace!
>WTF?
Welcome to the hell of perl. Without vi I'd be a dead duck. I also
date my code changes... that way I can zip to the last place I
wrote in case I get that stupid error.
I *REALLY* wish perl would handle this better... or some perl guru
wrote a script for checking which { isn't matched. I did that in C
when I was learning LISP... no happliy forgotten. Could have SOLD it
to my classmates if I had some sense :-)
Cheers,
Fil.
--
Filip "I'll buy a vowel" Gieszczykiewicz | http://www.repairfaq.org/
Always and everything for the better!
Now exploring whatever, life, and the meaning of it all... and 'not' :-)
------------------------------
Date: Mon, 16 Aug 1999 20:42:08 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: unCRAP (was Re: Perl Services)
Message-Id: <37B8AFD9.C22DB9B6@chaos.wustl.edu>
Uri Guttman wrote:
> E-A> So, I've got a machine and you will review them. Kurt and Jeff can
> E-A> funnel in scripts from CRAP and CPAN, and all we need to find is some
> E-A> poor willing soul to organise and crack the whip! :) We should talk
> E-A> about this more at TPC. Actually, why don't we get a little BOF going on
> E-A> ...hmm...sunday night maybe? The CRAP/unCRAP BOF :)
>
> i like the BOF idea. but sunday night is no good for me. how about
> either lunch or 5/6pm on mon or tues? the evening hour would be before
> we pub crawl.
ok, lunch is difficult as everyone is stuffing their face with
food...nothing gets between me and my lunch :) How about monday? I'll
see what is going on and check with Jeff to see if he is reachable by
phone around that time [he isn't coming to tpc but wants to be in on
it]. :)
> the specs cn be tricky. just on the survey one alone, doe sit generate
> html on the fly or use a template? if a template what kind? server
> support should not be expected. we want these to be widely useable but
> not bloated either.
True...let's not over-engineer it before it flies...just think Spruce
Goose :)
e.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 560
*************************************