[15575] in Perl-Users-Digest
Perl-Users Digest, Issue: 2988 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 9 11:05:45 2000
Date: Tue, 9 May 2000 08:05:24 -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: <957884724-v9-i2988@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 9 May 2000 Volume: 9 Number: 2988
Today's topics:
Re: #How to parse and strip perl comments? <bmb@ginger.libs.uga.edu>
Re: @array holding %hash <nospam@devnull.com>
Re: Accidental Creation of Static Variable <iltzu@sci.invalid>
Re: Accidental Creation of Static Variable <uri@sysarch.com>
after the whatever.cgi? question? <no@spaming-or-else-ill-lame-you.com>
Re: after the whatever.cgi? question? <tony_curtis32@yahoo.com>
Re: after the whatever.cgi? question? <erick.jensen@unisys.com>
Re: after the whatever.cgi? question? <no@spaming-or-else-ill-lame-you.com>
Re: after the whatever.cgi? question? <no@spaming-or-else-ill-lame-you.com>
Re: after the whatever.cgi? question? <rhomberg@ife.ee.ethz.ch>
Re: after the whatever.cgi? question? <jeff@vpservices.com>
Re: after the whatever.cgi? question? <rhomberg@ife.ee.ethz.ch>
Re: after the whatever.cgi? question? <erick.jensen@unisys.com>
Re: after the whatever.cgi? question? <jeff@vpservices.com>
Re: after the whatever.cgi? question? <erick.jensen@unisys.com>
Re: after the whatever.cgi? question? <tony_curtis32@yahoo.com>
Re: after the whatever.cgi? question? <erick.jensen@unisys.com>
Re: after the whatever.cgi? question? <billy@arnis-bsl.com>
Re: AIX perl 5.6 compile garrem@my-deja.com
Apache perlmod updating - How? <tom.williamson@home.com>
Re: BEGIN and use (Eric Bohlman)
Re: CGI.pm <gellyfish@gellyfish.com>
Re: CGI.pm <fty@mediapulse.com>
Re: CGI.pm <flavell@mail.cern.ch>
Re: Command Line input <enders@mail.sub.uni-goettingen.de>
compile perl ? <hostmaster@thestormtroopers.com>
Re: compile perl ? <rootbeer@redcat.com>
Re: compile perl ? <rhomberg@ife.ee.ethz.ch>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 9 May 2000 08:18:04 -0400
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: #How to parse and strip perl comments?
Message-Id: <Pine.A41.4.10.10005090815460.16434-100000@ginger.libs.uga.edu>
On Tue, 9 May 2000, Peter Hill wrote:
> Abigail wrote:
> > That begs the question, why can't production code have comments?
> >
> > Abigail
> No reason, indeed. But nor does it beg the question. I want to strip the
> existing comments which are excessive,
> inappropriate and in some cases just plain wrong, since they were
> written at the level of "the next line does 'blah'". I'll then replace
> them with appropriate notes for any particular choices which may not be
> self evident from the code, which would seem to be better commenting
> practice than writing pseudo-code which *may* or *may not* reflect what
> the following code actually does in perl.
>
> But, I'm learning as I go; any comments on comments or commenting style
> appreciated.
Sounds like a manual job anyway, since you have to make a judgement call.
--
Brad
------------------------------
Date: 9 May 2000 07:35:07 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: @array holding %hash
Message-Id: <8f8f3b$a6u$0@216.155.33.31>
In article <8f3c5e$kp5$1@orpheus.gellyfish.com>, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:
| > y'see I LIKE elegant tricky solutions to things :D
|
| But please think about any maintenance programmers ...
one can rest assured that if I ever find reasons to use the 'tricky'
solution, that I will comment appropriately and succinctly
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 9 May 2000 13:10:42 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Accidental Creation of Static Variable
Message-Id: <957877513.6515@itz.pp.sci.fi>
In article <slrn8hec0e.234.abigail@ucan.foad.org>, Abigail wrote:
>In article <u98zxlgeq0.fsf@wcl-l.bham.ac.uk>, nobull@mail.com wrote:
>> You are probably accessing data
>>via an uninitialised pointer.
>
>There are no pointers in Perl, so your remark doesn't make much sense.
>
>> That way lies segmentation faults.
>
>Now, *that* would be a bug in perl. A Perl program should never segfault
>(unless of course you send it a SEGV signal).
Hmm.. I wouldn't really make such categorical statements.
$ perl -e 'unpack p => 1234'
Segmentation fault (core dumped)
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Tue, 09 May 2000 13:30:24 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Accidental Creation of Static Variable
Message-Id: <x7d7mvvok0.fsf@home.sysarch.com>
>>>>> "IK" == Ilmari Karonen <iltzu@sci.invalid> writes:
IK> In article <slrn8hec0e.234.abigail@ucan.foad.org>, Abigail wrote:
>>
>> Now, *that* would be a bug in perl. A Perl program should never segfault
>> (unless of course you send it a SEGV signal).
IK> Hmm.. I wouldn't really make such categorical statements.
IK> $ perl -e 'unpack p => 1234'
IK> Segmentation fault (core dumped)
then i wouldn't play with the p format of unpack if i were you. sure you
could segfault with it, hell, you can point it to anything so it breaks
perl's memory control. it is not a bug in perl but a very nasty ugly
back door. exploiting it doesn't count. if you are doing regular perl
work and not trying to core dump and you get one, then it is a bug in
perl.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Tue, 9 May 2000 14:51:16 +0100
From: "Jeff Winner" <no@spaming-or-else-ill-lame-you.com>
Subject: after the whatever.cgi? question?
Message-Id: <8f954t$ncp$1@supernews.com>
say if i had whatever.cgi?chacha=lalala
how do i get the value of the think after the question mark (chacha) and
after the equals (lalala)
Thanks
Jeff
------------------------------
Date: 09 May 2000 08:55:39 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <87aehzrfok.fsf@shleppie.uh.edu>
>> On Tue, 9 May 2000 14:51:16 +0100,
>> "Jeff Winner" <no@spaming-or-else-ill-lame-you.com> said:
> say if i had whatever.cgi?chacha=lalala how do i get the
> value of the think after the question mark (chacha) and
> after the equals (lalala)
$ perldoc CGI
use CGI;
my $val = param('chacha');
hth
t
------------------------------
Date: Tue, 9 May 2000 09:58:27 -0400
From: "Erick Jensen" <erick.jensen@unisys.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <8f95i4$h0k$1@mail.pl.unisys.com>
The part after the ? is called the query string. The following code should
work:
## Parse the query string
$lsQueryString = $ENV{'QUERY_STRING'};
@loFields = split(/&/,$lsQueryString);
foreach $lsField(@loFields) {
($lsFieldName,$lsFieldValue) = split(/=/,$lsField);
$sQuery{$lsFieldName} = $lsFieldValue;
}
It will put all the "lalala"'s into an associative array called %sQuery with
the "chacha"'s as the keys. If the "lalala"'s have special characters such
as spaces you'll have to process them in the foreach loop using something
like:
$lsFieldValue =~ tr/+/ /;
$lsFieldValue =~ s/%(..)/pack("c",hex($1))/ge;
before the $sQuery{ ... line above.
Hope this helps.
-Erick Jensen
"Jeff Winner" <no@spaming-or-else-ill-lame-you.com> wrote in message
news:8f954t$ncp$1@supernews.com...
> say if i had whatever.cgi?chacha=lalala
>
> how do i get the value of the think after the question mark (chacha) and
> after the equals (lalala)
>
> Thanks
>
> Jeff
>
>
------------------------------
Date: Tue, 9 May 2000 15:13:09 +0100
From: "Jeff Winner" <no@spaming-or-else-ill-lame-you.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <8f96du$als$1@supernews.com>
## Parse the query string
$lsQueryString = $ENV{'QUERY_STRING'};
@loFields = split(/&/,$lsQueryString);
foreach $lsField(@loFields) {
($lsFieldName,$lsFieldValue) = split(/=/,$lsField);
$sQuery{$lsFieldName} = $lsFieldValue;
}
so is $lsFieldValue = "lalala"
& $lsFieldName="chacha"
THanks
------------------------------
Date: Tue, 9 May 2000 15:14:42 +0100
From: "Jeff Winner" <no@spaming-or-else-ill-lame-you.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <8f96gr$nuk$1@supernews.com>
whats $val= then?"lalala"?
and how do you say if chacha is there?
Jeff
"Tony Curtis" <tony_curtis32@yahoo.com> wrote in message
news:87aehzrfok.fsf@shleppie.uh.edu...
> >> On Tue, 9 May 2000 14:51:16 +0100,
> >> "Jeff Winner" <no@spaming-or-else-ill-lame-you.com> said:
>
> > say if i had whatever.cgi?chacha=lalala how do i get the
> > value of the think after the question mark (chacha) and
> > after the equals (lalala)
>
> $ perldoc CGI
>
> use CGI;
> my $val = param('chacha');
>
> hth
> t
------------------------------
Date: Tue, 09 May 2000 16:34:31 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: after the whatever.cgi? question?
Message-Id: <391821F7.EB5033BF@ife.ee.ethz.ch>
Erick Jensen wrote:
> ## Parse the query string
> $lsQueryString = $ENV{'QUERY_STRING'};
[snip]
> $lsFieldValue =~ s/%(..)/pack("c",hex($1))/ge;
> Hope this helps.
This certainly doesn't help
use the CGI module instead of cargo cult programming.
- Alex
------------------------------
Date: Tue, 09 May 2000 07:34:06 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <391821DE.60A7CD4B@vpservices.com>
Jeff Winner wrote:
>
> ## Parse the query string
> $lsQueryString = $ENV{'QUERY_STRING'};
> @loFields = split(/&/,$lsQueryString);
> foreach $lsField(@loFields) {
> ($lsFieldName,$lsFieldValue) = split(/=/,$lsField);
> $sQuery{$lsFieldName} = $lsFieldValue;
> }
>
> so is $lsFieldValue = "lalala"
> & $lsFieldName="chacha"
Do NOT use this method. Look back through the archives of this
newsgroup for hundreds of articles about why you should not use this
method, especially if you are a beginner. Stick with Tony Curtis'
advice to use the CGI.pm module. There are many security problems,
potential errors, and other traps that CGI.pm takes care of. Use the
CGI.pm module. There is extensive documentation for the module (type
perldoc CGI at a command prompt, or if on windows go to
start-menu/programs/activeperl/online-documtnetation).
If the query string is whatever.cgi?lalala=chacha
# import the module into your script
use CGI qw(:all);
# check to see if there is a lalala= in the query string
if( param('lalala') ) { ... }
# print chacha
print param('lalala');
# print all name=value pairs in the query string
for(param) { print "$_ is set to ", param($_), "\n"; }
This also works for testing scripts on the command line or for
interpreting data sent from HTML forms. And many other features.
--
Jeff
------------------------------
Date: Tue, 09 May 2000 16:35:33 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: after the whatever.cgi? question?
Message-Id: <39182235.31AEBB81@ife.ee.ethz.ch>
Jeff Winner wrote:
>
> whats $val= then?"lalala"?
> and how do you say if chacha is there?
how about reading the relevant documentation as suggested by Tony
and trying it, instead of expecting others to read them to you?
- Alex
------------------------------
Date: Tue, 9 May 2000 10:37:56 -0400
From: "Erick Jensen" <erick.jensen@unisys.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <8f97s6$j9t$1@mail.pl.unisys.com>
"Jeff Winner" <no@spaming-or-else-ill-lame-you.com> wrote in message
news:8f96du$als$1@supernews.com...
> ## Parse the query string
> $lsQueryString = $ENV{'QUERY_STRING'};
> @loFields = split(/&/,$lsQueryString);
> foreach $lsField(@loFields) {
> ($lsFieldName,$lsFieldValue) = split(/=/,$lsField);
> $sQuery{$lsFieldName} = $lsFieldValue;
> }
>
>
> so is $lsFieldValue = "lalala"
> & $lsFieldName="chacha"
Yes, but use the associative array $sQuery. For example:
$sQuery{'chacha'} will equal "lalala"
It may be easier to use the CGI module as the others have noted, but I've
never used it.
-Erick Jensen
------------------------------
Date: Tue, 09 May 2000 07:44:13 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <3918243D.99821873@vpservices.com>
Erick Jensen wrote:
>
> The part after the ? is called the query string.
That's true.
> The following code should work:
>
> ## Parse the query string
> $lsQueryString = $ENV{'QUERY_STRING'};
Change "should work" to "may work under limited circumstances and is
bound to fail in other circumstances and to present security risks in
other circumstances". This do-it-yourself approach to parsing query
strings has been discussed on this newsgroup hundreds of times. Unless
you know what you are doing (which from this code it is evident you do
not), you should use CGI.pm.
--
Jeff
------------------------------
Date: Tue, 9 May 2000 10:43:06 -0400
From: "Erick Jensen" <erick.jensen@unisys.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <8f9866$jc7$1@mail.pl.unisys.com>
What would really help is if you removed the bug up your ass.
-Erick Jensen
"Alex Rhomberg" <rhomberg@ife.ee.ethz.ch> wrote in message
news:391821F7.EB5033BF@ife.ee.ethz.ch...
> Erick Jensen wrote:
>
> > ## Parse the query string
> > $lsQueryString = $ENV{'QUERY_STRING'};
>
> [snip]
>
> > $lsFieldValue =~ s/%(..)/pack("c",hex($1))/ge;
>
> > Hope this helps.
>
> This certainly doesn't help
>
> use the CGI module instead of cargo cult programming.
>
> - Alex
------------------------------
Date: 09 May 2000 09:57:19 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <877ld3rcts.fsf@shleppie.uh.edu>
>> On Tue, 9 May 2000 10:43:06 -0400,
>> "Erick Jensen" <erick.jensen@unisys.com> said:
> What would really help is if you removed the bug up your
> ass. -Erick Jensen
Please post your replies *after* the cited text you want
to reply to, otherwise it's very difficult to follow
dangling referents in the thread of articles.
Also, this isn't comp.lang.perl.ad-hominem -- if you have
an opinion about why you think this hardcoded QUERY_STRING
code is better than CGI.pm, let's hear it. Simply emoting
one-liners (in the canonical sense of "one-liner") doesn't
get us anywhere.
So...do you think your code is better than CGI.pm? And if
so, why?
Having programmed CGI before Lincoln's magic incantations,
CGI.pm was a ${deity}send.
------------------------------
Date: Tue, 9 May 2000 10:54:35 -0400
From: "Erick Jensen" <erick.jensen@unisys.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <8f98rc$k7g$1@mail.pl.unisys.com>
Sorry Mr. Perl Guru. I've used that bit of code for over 3 years now and
have never had a problem. Maybe you should post your replies to
alt.unwanted.commentary.
-Erick Jensen
"Jeff Zucker" <jeff@vpservices.com> wrote in message
news:3918243D.99821873@vpservices.com...
> Erick Jensen wrote:
> >
> > The part after the ? is called the query string.
>
> That's true.
>
> > The following code should work:
> >
> > ## Parse the query string
> > $lsQueryString = $ENV{'QUERY_STRING'};
>
> Change "should work" to "may work under limited circumstances and is
> bound to fail in other circumstances and to present security risks in
> other circumstances". This do-it-yourself approach to parsing query
> strings has been discussed on this newsgroup hundreds of times. Unless
> you know what you are doing (which from this code it is evident you do
> not), you should use CGI.pm.
>
> --
> Jeff
------------------------------
Date: Tue, 09 May 2000 14:23:16 GMT
From: Ilja <billy@arnis-bsl.com>
Subject: Re: after the whatever.cgi? question?
Message-Id: <8f9700$58h$1@nnrp1.deja.com>
In article <8f954t$ncp$1@supernews.com>,
"Jeff Winner" <no@spaming-or-else-ill-lame-you.com> wrote:
> say if i had whatever.cgi?chacha=lalala
>
> how do i get the value of the think after the question mark (chacha) and
> after the equals (lalala)
>
> Thanks
>
> Jeff
>
Read CGI.pm docs about this and many more things regarding CGI.
Usefull info sources also are:
http://www.cpan.org/doc/FAQs/cgi/idiots-guide.html
http://www.cpan.org/doc/FAQs/cgi/perl-cgi-faq.html
Ilja.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 09 May 2000 13:57:19 GMT
From: garrem@my-deja.com
Subject: Re: AIX perl 5.6 compile
Message-Id: <8f95fm$3hc$1@nnrp1.deja.com>
In article <390890AB.607135E@uhc.com>, Chris Covington wrote:
> It worked well using the extra cost IBM compiler instead of gcc.
> Fortunately we are a big enough shop to have one laying around.
OTOH, I'm having some trouble with the AIX compiler (AIX 4.3.3 and
C for AIX 4.4.0.2). Configure -de runs fine, with all defaults taken.
But the make immediately fails with this:
"/usr/include/sys/bitypes.h", line 25.44: 1506-334 (S) Identifier
int8_t has already been defined on line 65
of "/usr/include/sys/inttypes.h".
"/usr/include/sys/bitypes.h", line 26.42: 1506-334 (S) Identifier
u_int8_t has already been defined on line 634
of "/usr/include/sys/inttypes.h".
"/usr/include/sys/bitypes.h", line 27.43: 1506-334 (S) Identifier
int16_t has already been defined on line 66
of "/usr/include/sys/inttypes.h".
"/usr/include/sys/bitypes.h", line 28.41: 1506-334 (S) Identifier
u_int16_t has already been defined on line 636
of "/usr/include/sys/inttypes.h".
"/usr/include/sys/bitypes.h", line 29.43: 1506-334 (S) Identifier
int32_t has already been defined on line 67
of "/usr/include/sys/inttypes.h".
"/usr/include/sys/bitypes.h", line 30.41: 1506-334 (S) Identifier
u_int32_t has already been defined on line 638
of "/usr/include/sys/inttypes.h".
"/usr/local/include/arpa/inet.h", line 75.28: 1506-277 (S) Syntax
error: possible missing ';' or ','?
make: *** [miniperlmain.o] Error 1
Any suggestions would be appreciated. Thanks...
-Matt
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 09 May 2000 14:08:30 GMT
From: "Tom Williamson" <tom.williamson@home.com>
Subject: Apache perlmod updating - How?
Message-Id: <yZUR4.108653$U4.871602@news1.rdc1.az.home.com>
I've got both Perl 5.005 and the Apache perlmod running on my system, and I
guess they must be different animals - I've got "real Perl" updated with
DBD::Sybase but the perlmod module stubbornly refuses to accept that it
should talk to Sybase now?
What is the difference between the perlmod and Perl? And, any ideas how I
can update my perlmod module? (Sorry, open source newbie - if it helps, I
have been RTFM for four days now, on and off, and am still stumped).
Thanks...
------------------------------
Date: 9 May 2000 09:58:37 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: BEGIN and use
Message-Id: <8f8ngd$ha4$2@slb0.atl.mindspring.net>
Tony Curtis (tony_curtis32@yahoo.com) wrote:
: statements in perl are terminated by `;'
Nope. They're *separated* by ';'.
In Perl (and Pascal and possibly other languages), semicolons are part of
a grammatical structure that could be loosely called "list of statements"
which consists of either a single statement, or a bunch of statements
with semicolons in between them. In C (and Java and possibly other
languages), semicolons are parts of the statements themselves; a list of
statements is just one statement immediately after another with nothing
in between.
------------------------------
Date: 8 May 2000 21:07:47 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CGI.pm
Message-Id: <8f76qj$2v7$1@orpheus.gellyfish.com>
On Mon, 08 May 2000 18:31:13 GMT Jason Malone wrote:
> Is it possible with CGI.pm to read all of the form variables into an
> associative array?
>
> For example if I have a web form that submits the following vars/values to
> the script
>
> var1=value1
> var2=value2
> var3=value3
>
> Is it possible to do something like
>
> %FORM = param();
>
> and get
>
> $FORM{var1} == "value1"
> $FORM{var2} == "value2"
> $FORM{var3} == "value3"
>
I havent the faintest idea why you would want to do this but you can do:
use CGI qw(:standard);
my %FORM;
$FORM{$_} = param($_) foreach (param());
But unless you have some compelling reason to do this you might as well
do :
param('var1');
whenever you need that value.
/J\
--
Oh, that's hot. There isn't a man alive that wouldn't get turned on by
that. Well, g'night.
--
fortune oscar homer
------------------------------
Date: Tue, 9 May 2000 08:20:15 -0400
From: "Jay Flaherty" <fty@mediapulse.com>
Subject: Re: CGI.pm
Message-Id: <8f907q$tof$1@news3.icx.net>
Makarand Kulkarni <makarand_kulkarni@My-Deja.com> wrote in message
news:39170F0A.80CF3A2B@My-Deja.com...
>
> Jason Malone wrote:
>
> > Is it possible with CGI.pm to read all of the form variables into an
> > associative array?
>
> use the Vars() method. This is clearly explained in the CGI.pm
> documentation. You have to be careful in the cases where
> there are more than one name/value pairs sharing the same name.
> In this case multivalued parameters will be returned as a packed string,
> separated by the "\0" (null) character.
You could also do the following:
use CGI qw(:cgi-lib)
ReadParse(); # this creates the %in hash that contains the named CGI
parameters.
You can intermix the use of the %in hash with the function oriented style.
If you want to use the OO style you will need to recover the object like so:
use CGI qw(:cgi-lib);
ReadParse();
$q = $in{CGI};
This is right out of the documentation (perldoc CGI)
jay
------------------------------
Date: Tue, 9 May 2000 15:09:07 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: CGI.pm
Message-Id: <Pine.GHP.4.21.0005091458240.12043-100000@hpplus03.cern.ch>
On Tue, 9 May 2000, Jay Flaherty wrote:
> Makarand Kulkarni <makarand_kulkarni@My-Deja.com> wrote in message
> news:39170F0A.80CF3A2B@My-Deja.com...
> > > Is it possible with CGI.pm to read all of the form variables into an
> > > associative array?
> >
> > use the Vars() method. This is clearly explained in the CGI.pm
> > documentation.
Indeed it is...
> You could also do the following:
>
> use CGI qw(:cgi-lib)
> ReadParse(); # this creates the %in hash that contains the named CGI
> parameters.
CGI.pm clearly advertises this as a transition aid for old scripts.
I don't understand why you are bringing it up for new applications.
> This is right out of the documentation (perldoc CGI)
Where, of course, you noted the rubrics:
To make it easier to convert older scripts that use cgi-lib.pl,
CGI.pm provides a CGI::ReadParse() call that is compatible with
cgi-lib.pl's ReadParse() subroutine.
which you conveniently suppressed before offering tossing it onto what
seemed to be a perfectly fine solution that had already been offered
by a respected participant here.
Score adjusted accordingly.
have fun
------------------------------
Date: Tue, 09 May 2000 08:59:05 +0100
From: Markus Enders <enders@mail.sub.uni-goettingen.de>
Subject: Re: Command Line input
Message-Id: <3917C549.61B4022C@mail.sub.uni-goettingen.de>
Hi Chris,
chris2037@my-deja.com wrote:
> The user can type in a multitude of switches then filenames like so
Usually you should have your command line input in @ARGV.
Usually.
Somehow, I found myself in the situation where it wasn't the case
anymore. Suddenly, without any change of my code, the perl interpreter
didn't put anything in ARGV. (happened wth ActivePerl 5.6 and 5.005
under Windows NT)
If there is nothing in ARGV the getopt module couldn't work either, of
course.
Reinstallation of Perl helped.
> myscript -nvrs file1
you should have "-nvrs" ind $ARGV[0] and "file1" in $ARGV[1]
Ciao
Markus
------------------------------
Date: Tue, 9 May 2000 13:24:48 +0200
From: "Matthias Auchmann" <hostmaster@thestormtroopers.com>
Subject: compile perl ?
Message-Id: <3917f579$0$41650@SSP1NO17.highway.telekom.at>
Hello world !
Is there any possibility to compile my perl-program ?
thnx !
------------------------------
Date: Tue, 9 May 2000 05:32:19 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: compile perl ?
Message-Id: <Pine.GSO.4.10.10005090531590.3921-100000@user2.teleport.com>
On Tue, 9 May 2000, Matthias Auchmann wrote:
> Is there any possibility to compile my perl-program ?
Not if you won't check the FAQ before you post! :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 09 May 2000 15:31:48 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: compile perl ?
Message-Id: <39181344.DB8AC2E3@ife.ee.ethz.ch>
Matthias Auchmann wrote:
> Is there any possibility to compile my perl-program ?
Yes
perl your-program.pl
- Alex
------------------------------
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 2988
**************************************