[10077] in Perl-Users-Digest
Perl-Users Digest, Issue: 3670 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 9 15:07:56 1998
Date: Wed, 9 Sep 98 12:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 9 Sep 1998 Volume: 8 Number: 3670
Today's topics:
Re: Array References and Function return values <jdporter@min.net>
Austin TX Perl Mongers mlehmann@prismnet.com
Re: Blocked pipes (?) <tringali@ed.ray.com>
Does Perl-win32 support dbmopen yet? losartan@my-dejanews.com
Re: Hash table (Lawrence Kirby)
Re: Looking for a programm in Perl!:=) (Mike Wescott)
Re: Manpage Wrapper <pstarbard@nrgn.com>
Re: Newbie Nested Reference Syntax Question <aqumsieh@tigre.matrox.com>
Re: Off topic, but ... [Was Re: Perl & Java - differenc <webmaster@fccjmail.fccj.cc.fl.us>
Re: Off topic, but ... [Was Re: Perl & Java - differenc (Clinton Pierce)
Re: Off topic, but ... [Was Re: Perl & Java - differenc <merlyn@stonehenge.com>
Perl Data Structures: trees etc... <jpa@formalsys.ca>
perl LDAPapi <zhong@cig.mot.com>
Re: Perl Programmer Needed <jdporter@min.net>
Re: Perl Programmer Needed <jdporter@min.net>
Perl Search Engine <jpa@formalsys.ca>
Re: Printing images <Tony.Curtis+usenet@vcpc.univie.ac.at>
sleep mr_potato_head@my-dejanews.com
Re: sprintf error in Perlis and PerlScript <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Stripping out 'bad' HTML (Peter Scott)
Re: Truncation occurring when passing values as hidden <simon.ransome@isis.suffolkcc.gov.uk>
Re: Truncation occurring when passing values as hidden (Craig Berry)
What does this error mean? (Amy O'Neill Houck)
Re: What does this error mean? (Matt Knecht)
Where to start? (Tracy Markham, N4LGH)
Why Perl Again ? dn5006@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 08 Sep 1998 13:48:06 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Array References and Function return values
Message-Id: <35F56DD6.619A712D@min.net>
(Jari Aalto+maile.perl) wrote:
>
> What I'd like to see is:
> return \@array
> but that means
> push @ret, @array1;
> push @ret, @array2;
> Which seems to be inefficient.
The pushes are slightly inefficient, compared to this
alternative:
return [ @array1, @array2 ];
John Porter
------------------------------
Date: Wed, 09 Sep 1998 18:11:47 GMT
From: mlehmann@prismnet.com
Subject: Austin TX Perl Mongers
Message-Id: <6t6gd2$r5q$1@nnrp1.dejanews.com>
I'd like to get an Austin TX Perl Mongers group going. Please email me,
mlehmann@prismnet.com if you are interested. If there is already an Austin
group that I am un-aware of, please let me know.
--
Give someone a Perl script and they can hack for a night, teach them Perl, and
they can hack for a lifetime.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 09 Sep 1998 12:54:38 -0400
From: "Scott J. Tringali" <tringali@ed.ray.com>
Subject: Re: Blocked pipes (?)
Message-Id: <35F6B2CE.15FB@ed.ray.com>
Donovan Rebbechi wrote:
> I am writing some programs that use pipes. I am getting some sort of
> "blockage", ie the programs freeze if I put a large amount of data into
> the pipe.
Question is why are you using a pipe to do this?
A pipe is only really useful for communication between two processes
that are running in a parallel. In the above situation, don't use a
pipe-- you only have one process. Stick your data into variable, or a
if it's huge, a temp file.
If you need the behavior of a stack or queue of, well, use an array!
Look up push(), pop(), and shift().
------------------------------
Date: Wed, 09 Sep 1998 18:15:56 GMT
From: losartan@my-dejanews.com
Subject: Does Perl-win32 support dbmopen yet?
Message-Id: <6t6gks$rot$1@nnrp1.dejanews.com>
Hello,
Somewhat new to Perl 5 here and was wondering if any curent versions of
Perl 5 support Datbase access through dbmopen as of yet. Thanks!!
-David
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 09 Sep 98 16:54:18 GMT
From: fred@genesis.demon.co.uk (Lawrence Kirby)
Subject: Re: Hash table
Message-Id: <905360058snz@genesis.demon.co.uk>
In article <6t57u3$54r$1@nnrp1.dejanews.com> sjagadish@my-dejanews.com writes:
>I need to compare string data in two huge text files (both > 150KB) and return
>number of matches found etc. A linear search is obviously going to be very
>slow. Any ideas for implementing it ?
What constitutes a match?
>Thanks, pls email your reply. I might not notice it in the flood of posts
>here.
Just look at the responses in this thread.
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
It is very easy to do with Deja News.
--
-----------------------------------------
Lawrence Kirby | fred@genesis.demon.co.uk
Wilts, England | 70734.126@compuserve.com
-----------------------------------------
------------------------------
Date: 09 Sep 1998 14:43:40 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
To: Plate Forme Jeunes Diplomes <plateforme@wanadoo.fr>
Subject: Re: Looking for a programm in Perl!:=)
Message-Id: <x4ogsp6s9w.fsf@cygnus.ColumbiaSC.NCR.COM>
In article <35F68DD8.2F355C2B@wanadoo.fr> Plate Forme Jeunes Diplomes writes:
> That is that I have ever wrote, and now, I can't do anything.
> The loop doesn't work.
Well, you read the whole file, attempt to do some pattern matching
and then print only the last matches. Don't you want something like this:
open(....) or die "....";
while(<FILE>) {
match and extract data;
if(some condition) {
print a record;
reset variables;
}
}
close(FILE);
> The searchnig string doesn't work.
See comments below.
> The print doesn't work...
See comments below.
> I am going to be mad!!!
The phrase you want, I think, is "I'm going to go mad." :-)
> #!/usr/bin/perl
> open (FILE,"/win95/Perl/dr129a.htm") or die ("Impossible de trouver le fichier: $!");
> while (<FILE>) {
> chomp;
> $offre=$1 if ~m/(Offre.*?X)/s;
The ~ in this case is a bit-wise complement of the result of the match. Not what
you want. Try
$offre = $1 if /(Offre.*?X)/;
or maybe you really want
$offre = $1 if /Offre(.*?)X/;
[part deleted]
> $horaires =$1 if ~m/(Horaires.*?FONT)/s
$horaires is set but not used
> }
> close (FILE)
> print $offre ;
> print $date ;
> print $Ale ;
> print $duree ;
> print $descriptif;
> print $lieu ;
The program doesn't print any delimiters. Don't you want at least a
newline?
--
-Mike Wescott
mike.wescott@ColumbiaSC.NCR.COM
------------------------------
Date: Wed, 09 Sep 1998 13:04:58 -0400
From: Alan Starbard <pstarbard@nrgn.com>
Subject: Re: Manpage Wrapper
Message-Id: <35F6B53A.3C712497@nrgn.com>
Thanks, that sounds familiar. Pod sounds like a better idea. Thanks for your
help.
Andrew Johnson wrote:
> Alan Starbard wrote:
> >
> > A few years ago I remember downloading a script that would strip tagged
> > lines from a perl script and generate a man page automatically. I think
> > it was called "wrapman" or something like that. I have since switched
> > jobs and the scipt was lost in the process. If anyone has heard of it
> > or anything like it please let me know where I can find it.
> >
>
> current perls use pod for embedded manpages, but if you need the old
> program it was in chapter 6 of the 1st ed. Camel
> wrapman - page 319
> wrapinst - page 322
>
> All the chapter 6 scripts are still available on CPAN under:
> CPAN//scripts/nutshell/ch6/
>
> hope that helps
> regards
> andrew
--
Alan Starbard
Neurogen Corporation
pstarbard@nrgn.com
203.488.8201 Ext: 3112
------------------------------
Date: 09 Sep 1998 13:06:42 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: Newbie Nested Reference Syntax Question
Message-Id: <x3yhfyh5i71.fsf@tigre.matrox.com>
"Carey Sublette" <careys@paciolan.com> writes:
>
> I have been fiddling with this for quite a while but just cannot get the
> syntax to do this right.
First of all, go ahead and read perldoc perldsc ... it is enlightening!
>
> I'm trying to create a hash, whose values are references to anonymous hashes
> (whose values are in turn references to lists of arbitrary
> length). The
Basically, your data structure would look like this (I think):
%outer_hash = ( $outer_key1 => { # this starts an anonym. hash
$inner1_key1 => $inner1_value1, # an inner anon. hash
$inner1_key2 => $inner1_value2,
.
.
$inner1_keyn => $inner1_valuen },
$outer_key2 => {
$inner2_key1 => $inner2_value1, # another inner hash
$inner2_key2 => $inner2_value2,
.
.
$inner2_keyn => $inner2_valuen }
);
(I hope this was clear!)
> whole purpose of this is to read in a multi-column table of values line by
> line and sort it into categories (the keys to the first hash) and
> subcategories (the keys to the second level hashes).
>
> I can generate the first level hash just fine but creating the anonymous
> references is mystifying me (yes, I have been studying the perlref manpage,
> the book "Learning Perl" is of no help at all).
>
> undef %master;
> while (<MASTERLIST>) {
> chomp;
> @fields = split(/\t/,$_);
> $master{$fields[$headerfield1]} = [ $fields[$headerfield2],
> $fields[$namefield], $fields[$commentfield]];
> #Does this create a reference to an anonymous array correctly?
> #And what to do about the second level hash, for which
> $fields[$headerfield2] would be the key?
Yes .. this does create a reference to an anonymous array .. so .. if
you want to get $fields[$namefield] you have to do something like:
$master{$field[$headerfield1]}->[$fields[$namefield]];
or even more compactly
$master{$field[$headerfield1]}[$fields[$namefield]];
but .. you mentioned that you want a hash of HASHES .. not a hash of
arrays!! what exactly do you want???
> };
> close(MASTERLIST);
> unless (open OUT, ">Output.txt"){
> die "Couldn't open Output.txt\n";
> };
>
> @masterKey = sort keys %master;
> foreach $masterKey (@masterKey) {
> print OUT ($masterKey, "\n");
> print OUT ($master{$masterKey}); #This just prints stuff like
> "ARRAY(0xca48f8)", symbol table entries right?
> }
Yes .. why don't you try it out and see for yourself?
$master{$masterKey} is just a reference to an array. It is eactly
identical to \@some_array. Thus, to print out the contents of the
array, you must derefence it:
@{$master{$masterKey}}
>
> Thanks for any help straightening out my thinking here.
>
> Carey Sublette
I suggest you read over perldsc and rethink your problem over. If you
have more questions then ask again.
Hope this helps.
--
Ala Qumsieh | No .. not Just Another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Wed, 09 Sep 1998 13:35:27 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Off topic, but ... [Was Re: Perl & Java - differences and uses]
Message-Id: <35F6BC5F.5CD7A08A@fccjmail.fccj.cc.fl.us>
Randal Schwartz wrote:
>
> The following message is a courtesy copy of an article
> that has been posted to comp.lang.perl.misc as well.
Ditto.
>
> >>>>> "Bill" == Bill 'Sneex' Jones <sneaker@sneex.fccj.org> writes:
>
> Bill> Oh I don't know, I don't think anyone will miss
> Bill> Washington State :]
>
> Hey, watch out. We have to have *some* insulating buffer
> to keep the Canadians from flooding into Oregon.
>
> Washington - the great DMZ.
> Ditto for California (shielding us from Mexico). :)
I didn't mean to start an international incident! :]
(or even an Inter/Intra-State incident...)
>
> Just another post I'll probably regret tomorrow, :)
> --
Nah! People simply adore you :]
--
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
http://www.fccj.org/cgi/mail?webmaster | http://webmaster.fccj.org/Webmaster
------------------------------
Date: 9 Sep 1998 18:11:38 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: Off topic, but ... [Was Re: Perl & Java - differences and uses]
Message-Id: <6t6gcq$q1q1@eccws1.dearborn.ford.com>
In article <8c7lzdz1it.fsf@gadget.cscaper.com>,
Randal Schwartz <merlyn@stonehenge.com> writes:
>>>>>> "Bill" == Bill 'Sneex' Jones <sneaker@sneex.fccj.org> writes:
>
>Bill> Oh I don't know, I don't think anyone will miss
>Bill> Washington State :]
>
>Hey, watch out. We have to have *some* insulating buffer
>to keep the Canadians from flooding into Oregon.
>
>Washington - the great DMZ.
>Ditto for California (shielding us from Mexico). :)
>
>Just another post I'll probably regret tomorrow, :)
That's why us Michiganians had the Great Lakes installed. Works
a helluva lot better than a chain-link fence. Now if we could
only keep out the Ohio people...
--
+------------------------------------------------------------------------+
| Clinton A. Pierce | "If you rush a Miracle Man, | http://www. |
| cpierce1@ford.com | you get rotten miracles" | dcicorp.com/ |
| fubar@ameritech.net |--Miracle Max, The Princess Bride| ~clintp |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*
------------------------------
Date: Wed, 09 Sep 1998 18:38:24 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Off topic, but ... [Was Re: Perl & Java - differences and uses]
Message-Id: <8clnntxhbn.fsf@gadget.cscaper.com>
>>>>> "Clinton" == Clinton Pierce <cpierce1@cp500.fsic.ford.com> writes:
Clinton> That's why us Michiganians had the Great Lakes installed. Works
Clinton> a helluva lot better than a chain-link fence. Now if we could
Clinton> only keep out the Ohio people...
"Looks like we're gonna need a larger MOAT".
(ducking...)
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Wed, 09 Sep 1998 15:28:42 -0300
From: John-Paul Arp <jpa@formalsys.ca>
Subject: Perl Data Structures: trees etc...
Message-Id: <35F6C8DA.892DA515@formalsys.ca>
Where could I find information on how to make linked lists and trees in
Perl? Does Perl even have pointers?
John-Paul
------------------------------
Date: Wed, 09 Sep 1998 12:09:36 -0500
From: "Fendy K. Zhong" <zhong@cig.mot.com>
Subject: perl LDAPapi
Message-Id: <35F6B650.237C228A@cig.mot.com>
Does anyone use the LDAPapi?
I am having problem installing the API. The error message is:
Can't load './blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module
Net::LDAPapi: ld.so.1: /tmp/gsmtt/bin/perl5: fatal: relocation error:
symbol not found: constant: referenced in
./blib/arch/auto/Net/LDAPapi/LDAPapi.so at
/usr/test/gsmtesttools/lib/perl5/sun4-solaris/5.00404/DynaLoader.pm line
166.
at test.pl line 11
BEGIN failed--compilation aborted at test.pl line 11.
not ok 1
make: *** [test_dynamic] Error 2
Can anyone help me with this?
Fendy
------------------------------
Date: Tue, 08 Sep 1998 13:26:48 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl Programmer Needed
Message-Id: <35F568D8.B9C428A1@min.net>
Richard wrote:
>
> Notice, we are a small company.
Irrelevant. Going for the sympathy vote?
> We have some technical issues we need help with in Perl. Since this group
> is for getting help with Perl programming, I came here to ask.
If you had explained your technical issues, maybe some of us could have
helped. But no, you posted a job opening. That's not a techical issue.
> I have been using Usenet for almost a decade now.
So you say. Or you're deliberately violating usenet custom.
> Not as long as your two decades, but enough time to be able thoughtful
> and respectful of the other Usenet users.
Surely. So why the lapse?
Because you stand to gain from it, of course. For shame.
> I have had nothing but good response from my post.
> It was HONEST, STRAIGHTFORWARD and BENEFITS OTHERS.
And yet clpm is still the wrong place to post it!
The ends do not justify the means.
> Doing it publicly like this only serves to boost your ego by
> showing you knew something someone else doesn't know.
As a general argument, this can not be allowed to stand.
God forbid anyone should withhold their knowledge from others
for fear of being accused of self-servience.
> In a few days your message will be expired. So will mine.
Sorry. Some sites archive news messages for a very *very* long time.
See www.dejanews.com for an example of one.
> In the meantime, I was able to find people trying to earn an HONEST
> dollar and I will get my Perl problems solved.
Champion of the little guy! All is forgiven!
> someone trying their damndest to earn a living and run an HONEST BUSINESS.
You mean "HONEST BUSINESS (tm)", I think.
The ends do not justify the means, and I think you know that.
How about an apology for your violation of netiquette?
John Porter
------------------------------
Date: Tue, 08 Sep 1998 13:31:10 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl Programmer Needed
Message-Id: <35F569DE.95A18A1B@min.net>
Richard wrote:
>
> My point still stands, I not only didn't hurt anyone by my post, I am
> helping others. HONESTLY. Perhaps if you flame me enough you will stay off
> some other HONEST SMALL BUSINESSES trying to offer money to people who want
> to use their HARD LEARNED talents to put FOOD on their table and clothes on
> their kids backs.
Please, cut the crap. You posted your commercial advertisement in
an inappropriate newsgroup. You knowingly violated netiquette.
How HONEST does that make you, really?
> Like in my own case!
Indeed, that's what it boils down to -- no one benefits as much from
your inappropriate post as you do.
John Porter
------------------------------
Date: Wed, 09 Sep 1998 15:37:36 -0300
From: John-Paul Arp <jpa@formalsys.ca>
Subject: Perl Search Engine
Message-Id: <35F6CAF0.EDC80228@formalsys.ca>
I am working on a perl search engine for a massive and disorganized
Intranet. (Nearly 2
gigs worth of text formatted files.) I am looking for a way to index
these files to speed up
the search. (Currently, if you want a list of all the files containing a
word or words, you
would have to wait for a good hour or two.) Is any body aware solutions
that are already
available, or have any ideas on how to organize 2 gigs worth of text
files into a search-able
index?
ANY help at all would be appreciated.
John-Paul
------------------------------
Date: 08 Sep 1998 11:15:35 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Printing images
Message-Id: <7xg1e39d8o.fsf@vcpc.univie.ac.at>
Re: Printing images, A <dodge@aloha.net> said:
<img src="..." alt="...">
A> Does not work. The gif files are printed to a html page
A> where several separate tables are generated in response
A> to customer input. The paragraph text comes out OK,
A> where I need these image files for clarification but; the
A> program hangs when I access the program on the apache
A> server, perl 5, when I add the images.
Then the problem lies elsewhere (I'd guess you've got the
wrong path to the images in the src attribute). Any road
up, this is not a perl problem, you'll get more exact help
on writing HTML & CGI in
<URI:news:comp.infosystems.www.authoring.html>
<URI:news:comp.infosystems.www.authoring.cgi>
<URI:news:comp.infosystems.www.servers.YOURPLATFORM>
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Wed, 09 Sep 1998 18:08:29 GMT
From: mr_potato_head@my-dejanews.com
Subject: sleep
Message-Id: <6t6g6s$qqe$1@nnrp1.dejanews.com>
i have perl 5.004 release 4 and the sleep function in perl gives me
"segmentation fault core dump". can anyone tell me of a fix? what was the
difference from 5.001 to 5.004? my code looks something like...
#!/usr/local/bin/perl
procedure1:
sleep (5);
print "hello\n";
goto procedure1;
thanks in advance.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 09 Sep 1998 19:00:27 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: sprintf error in Perlis and PerlScript
Message-Id: <833ea1kyqc.fsf@vcpc.univie.ac.at>
Re: sprintf error in Perlis and PerlScript, David
<David@iqtexas.com> said:
David> When ever I use sprintf in Perlis or ASP(PerlScript),
David> errors are returned.
David> ... y=1034.5635; x=sprintf("%.1f",y); ...
(You don't need double-quotes around the sprintf format
string, single ones will do.)
You do mean `$x' and `$y' throughout, don't you?
and
$self->kick('bottom');
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: 9 Sep 1998 17:42:14 GMT
From: psk@euclid.jpl.nasa.gov (Peter Scott)
Subject: Re: Stripping out 'bad' HTML
Message-Id: <6t6elm$k27@netline.jpl.nasa.gov>
In article <6t06kf$q3p$1@plug.news.pipex.net>, "Jeremy Goldberg" <jgoldberg@dial_put-a-decimal-here_pipex.com> writes:
> Does anyone have a decent algorithm (or a module, hint, hint) to take text
> and strip out 'bad' HTML e.g. "3 < 5" (which should be written as "3 <
> 5") without stripping 'good' HTML e.g. "<b>3 is less than 5</b>"? It would
> be good to allow users to put in HTML (in news articles, say, or message
> board articles) without letting them wreck their HTML utterly.
>
> Any ideas gratefully appreciated.
Look at SGMLS.pm and nsgmls: see
http://www.oasis-open.org/cover/publicSW.html#sgmlspm
It will at least tell you where the input fails to conform to the
HTML DTD you supply. However, it is impossible in general to recover
what might be valid HTML following an error; don't expect a complete
solution. Possible approaches to stripping out the bad HTML will be
hampered by any tag minimization. This is going to be difficult.
--
This is news. This is your | Peter Scott, NASA/JPL/Caltech
brain on news. Any questions? | (psk@euclid.jpl.nasa.gov)
Disclaimer: These comments are the personal opinions of the author, and
have not been adopted, authorized, ratified, or approved by JPL.
------------------------------
Date: Wed, 09 Sep 1998 08:55:55 +0100
From: Simon Ransome <simon.ransome@isis.suffolkcc.gov.uk>
Subject: Re: Truncation occurring when passing values as hidden variables
Message-Id: <35F6348B.23C0E200@isis.suffolkcc.gov.uk>
Darren Hayes wrote:
> Is there an issue with delivering data containing spaces to the values
> in hidden INPUT TYPES ? Do I need to escape the space characters in
> the CGI script before the data is written to the hidden variables in
> the dynamic HTML? Is there an easy way to do this?
>
> <INPUT TYPE = "hidden" NAME = "Presenter_Name" VALUE =
> $form_data{'Presenter_name'}>
>
Hi - this one's easy: you must enclose the value you assign to the
parameter in quotes, otherwise the browser treats the second (or Nth)
space-delimited text as more tag parameters, ie in your example:
<INPUT TYPE = "hidden" NAME = "Presenter_Name" VALUE =
Johnny Appleseed>
you might as well have had:
<INPUT TYPE = "hidden" NAME = "Presenter_Name" VALUE = Johnny APPLESEED=""
>
and the browser will just ignore the attempt to set a value to the
parameter "APPLESEED" as it doesn't know what it is. Sending
<INPUT TYPE = "hidden" NAME = "Presenter_Name" VALUE =
"Johnny Appleseed">
will work fine.
Simon
PS the GET type of cgi data passing limits data returned through the cgi
gateway to 256 (or something) characters; use the POST method if you're
passing around lots of data.
======================================================================
Simon Ransome, email: Simon.ransome@isis.suffolkcc.gov.uk
Webmaster. Phone: +44 (0)1473 584472
ISIS Internet Fax: +44 (0)1473 584492
Suffolk County Council www: http://www.suffolkcc.gov.uk/
St Edmund House
County Hall, Ipswich. IP4 1LZ
United Kingdom
------------------------------
Date: 9 Sep 1998 18:12:34 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Truncation occurring when passing values as hidden variables
Message-Id: <6t6gej$i97$1@marina.cinenet.net>
Simon Ransome (simon.ransome@isis.suffolkcc.gov.uk) wrote:
: Darren Hayes wrote:
: > Is there an issue with delivering data containing spaces to the values
: > in hidden INPUT TYPES ? Do I need to escape the space characters in
: > the CGI script before the data is written to the hidden variables in
: > the dynamic HTML? Is there an easy way to do this?
: >
: > <INPUT TYPE = "hidden" NAME = "Presenter_Name" VALUE =
: > $form_data{'Presenter_name'}>
:
: Hi - this one's easy: you must enclose the value you assign to the
: parameter in quotes, otherwise the browser treats the second (or Nth)
: space-delimited text as more tag parameters,
Of course, here's yet another place where CGI.pm makes life easier. Just
use the 'hidden' method and it'll automagically get the quoting right:
print hidden('Presenter_Name', $form_data{'Presenter_name'});
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Wed, 9 Sep 1998 10:17:22 -0700
From: theteam@pinkworks.com (Amy O'Neill Houck)
Subject: What does this error mean?
Message-Id: <MPG.106057fe967ae94398968e@news.emeraldnet.net>
501-5.5.2 ^ 501 5.5.2 Path data: Expected an rfc821_string
Got it when trying to set up form at
http://www.harrisonhospital.org/index.html
Thanks,
Amy
--
Work for Pinkworks
http://www.pinkworks.com/jobs.html
------------------------------
Date: Wed, 09 Sep 1998 17:30:12 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: What does this error mean?
Message-Id: <EWyJ1.122$4S1.545028@news3.voicenet.com>
Amy O'Neill Houck <theteam@pinkworks.com> wrote:
>501-5.5.2 ^ 501 5.5.2 Path data: Expected an rfc821_string
>
>Got it when trying to set up form at
>http://www.harrisonhospital.org/index.html
Not a Perl question, but all the info you need is right there.
RFC 821 states:
The first command in a session must be the HELO command. The
HELO command may be used later in a session as well. If the
HELO command argument is not acceptable a 501 failure reply must
be returned and the receiver-SMTP must stay in the same state.
I'd suggest having a local copy of all RFC's. They make great grep
fodder.
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: Wed, 09 Sep 1998 17:39:45 GMT
From: tracy54@earthlink.net (Tracy Markham, N4LGH)
Subject: Where to start?
Message-Id: <35f6bc3e.50134392@news.earthlink.net>
Which newsgroup and/or web sites would you kids suggest for a
webmaster trying to implement Perl on an NT machine using Apache for
Win32 ?
I'm not new to NT ....
I'm new to Apache, but have had it running a few months and it seems
to be OK .....
Am TOTALLY new to perl.
I've downloaded the Perl for Win32, and it seems to run. If I try the
example file in a dos window, it does what the example says.
We keep geting "internal Server Error"s from attempts to write back to
an html file. My HTML developer swears the Perl script should work,
and that my server is not configured properly.
Where to go?? I know this is probably not the appropriate group for
the question, but alas, I'm lost ....
Tracy Markham
------------------------------
Date: Wed, 09 Sep 1998 17:00:33 GMT
From: dn5006@my-dejanews.com
Subject: Why Perl Again ?
Message-Id: <6t6c7g$l66$1@nnrp1.dejanews.com>
As John Porter pointed out:
perl -de0
does not do Shell.
I enhance line continuation with backslash and Zenin's recommendation of
command history.
#!/usr/bin/perl use Shell; use Term::ReadLine; my $term = new
Term::ReadLine "Perl Super Shell"; $IPERL::l=1; $IPERL::statement='';
while (defined ($_ = $term->readline("$IPERL::l> ")) ) { next if
(/^\s*($|#)/); # ignore empty & comment line $IPERL::statement .= $_; #
concatenate statement sofar if (!($IPERL::statement =~ s/\\\s*$//)) { #
backslash as line continuation print eval $IPERL::statement; print ($@ ||
"\n"); $IPERL::l++; $IPERL::statement=''; $term->addhistory($_) if /\S/;
} }
As not having enough, I already devised another version, with which I can do:
3> for (1 .. 2) {
3> print "Hello $_\n"
3>}
Hello 1
Hello 2
without the line continuation backslash.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3670
**************************************