RE: HINT: regex coach

2004-09-09 Thread NYIMI Jose (BMB)
> -Original Message- > From: Jose Alves de Castro [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 08, 2004 7:42 PM > To: Ing. Branislav Gerzo > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: HINT: regex coach > > > On Wed, 2004-09-08 at 10:17, Ing. Branislav Gerzo wrote:

Re: Regex for accepting text and HTML *entities*

2004-09-09 Thread Gunnar Hjalmarsson
Chris Welch wrote: I thought the deal with writing to external files and such (remember some things will be written to flat files as well as DBM files) is that it is a security issue if no checking is done for malicious script - I think you are mixing up things. Data is just data. If 1) the data

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Gunnar Hjalmarsson
Robert Page IV wrote: Sean Davis wrote: White space (including carriage returns) is ignored by HTML, generally. Try surrounding your text output by the tag (preformatted text). I added pre('executive summary') and pre('details') to the save_weekly() subroutine and this worked! Thank you very much

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Robert Page IV
Gunnar: Thanks. I read this before in Lincoln Stein's CGI book but it did not register the first time. Thanks for the help as this solves my current issues. Robert Page On Sep 9, 2004, at 5:31 AM, Gunnar Hjalmarsson wrote: Robert Page IV wrote: Sean Davis wrote: White space (including carriage re

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Chad A Gard
On Sep 8, 2004, at 9:40 PM, Robert Page IV wrote: Gunnar: I have attached the CGI script: weekly.pl. The subroutine save_weekly() captures the 'executive summary' and 'details' values entered into the textarea via $summary = param('executive summary') and $details = param('details'). For Debug pu

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Chris Devers
On Thu, 9 Sep 2004, Chad A Gard wrote: Try this: $details = param('details'); $details =~ s/\r//g; Careful now... $ perl -e '$details = "foo"; $details =~ s/\r//g;' Search pattern not terminated at -e line 1. $ The '/' in '' needs to be escaped, or the regex is unbalanced. This is why I

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Chad A Gard
On Sep 9, 2004, at 9:57 AM, Chris Devers wrote: This is why I like to use something other than a slash when trying to match html or xml: $details =~ s#\r##g; Also, did you really mean to replace '\r' with '' ? That will, depending on the file encoding, either [a] do nothing, or [b] strip ou

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Gunnar Hjalmarsson
Chris Devers wrote: I suspect you probably didn't mean to do either of these, but rather: $details =~ s#\n#\n#g; Which should portably add a break tag to the end of each source line. HTML parsing is a real bear to get right. For a limited problem like this, mucking around with regular expressio

Apache vs Boa error LFLF

2004-09-09 Thread Shawn Sharp
I am working on some perl cgi code that works on an apache webserver but I get the following error when I run it on a boa webserver [08/Sep/2004:23:41:09 +] cgi_header: unable to find LFLF. I have tried the following change From: print "content-type: text/html\n\n"; changed t

table with variables

2004-09-09 Thread Ing. Branislav Gerzo
Hi CGIers! I have small question about putting variables into CGI script, which produces table, here is snip of code: use CGI qw(:standard); #... open FH, items.txt or die "Can't open $!"; my @items = sort ; print table( {-border=>undef}, caption('Choose your favourite brand:'),

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Chris Devers
On Thu, 9 Sep 2004, Gunnar Hjalmarsson wrote: I can't see what this has to do with HTML parsing. The immediate problem has nothing to do with parsing, but it seemed like some of the suggestions given were starting to go in that direction. Unless I was just misreading things... -- Chris Devers --

Re: table with variables

2004-09-09 Thread Gunnar Hjalmarsson
Ing. Branislav Gerzo wrote: I have small question about putting variables into CGI script, which produces table, here is snip of code: use CGI qw(:standard); #... open FH, items.txt or die "Can't open $!"; my @items = sort ; print table( {-border=>undef}, caption('Choose your favour

RE: table with variables

2004-09-09 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : Hi CGIers! : : I have small question about putting variables into CGI : script, which produces table, here is snip of code: : : use CGI qw(:standard); : #... : open FH, items.txt or die "Can't open $!"; : my @items = sort ; : print table( :

Re: table with variables

2004-09-09 Thread Ing. Branislav Gerzo
Charles K. Clarkson [CKC], on Thursday, September 9, 2004 at 17:37 (-0500) thinks about: CKC> : print table( : {-border=>>undef}, CKC> : caption('Choose your favourite brand:'), CKC> : Tr({-align=>CENTER,-valign=>TOP},), CKC> That doesn't look right. Are CENTER and TOP

RE: table with variables

2004-09-09 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : Charles K. Clarkson [CKC], on Thursday, September 9, 2004 at : 17:37 (-0500) thinks about: : : : : print table( : : {-border=>>undef}, : : : caption('Choose your favourite brand:'), : : : Tr({-align=>CENTER,-valign=>TOP},), :

RE: table with variables

2004-09-09 Thread Charles K. Clarkson
Charles K. Clarkson wrote: : Closer inspection shows the above code doesn't work (right). : I think you wanted this. : : use CGI qw( table Tr td caption ); : : my @items = ( 1 .. 6 ); : print : table( : caption( 'Choose your favourite brand:' ), :

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Gunnar Hjalmarsson
Chris Devers wrote: On Thu, 9 Sep 2004, Gunnar Hjalmarsson wrote: I can't see what this has to do with HTML parsing. The immediate problem has nothing to do with parsing, but it seemed like some of the suggestions given were starting to go in that direction. Maybe. The reason for my remark is that

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Robert Page IV
Considering I am not parsing HTML, I am actually trying to 'generate' the text formatting I want in a HTML page, there is no need for a HTMl parser that I see. Robert On Sep 9, 2004, at 7:30 PM, Gunnar Hjalmarsson wrote: Chris Devers wrote: On Thu, 9 Sep 2004, Gunnar Hjalmarsson wrote: I can't se

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Robert Page IV
I am familiar with . What is the difference between and ? Robert Page On Sep 9, 2004, at 9:36 AM, Chad A Gard wrote: On Sep 8, 2004, at 9:40 PM, Robert Page IV wrote: Gunnar: I have attached the CGI script: weekly.pl. The subroutine save_weekly() captures the 'executive summary' and 'details' val

Re: table with variables

2004-09-09 Thread Bee
> > CKC> I don't understand the question. What while loop? > CKC> What would it be looping over? > > I want print all items into table, table should have 3 columns. > I don't know how to do it. > > Thanks and sorry for not clear question before. > > -- Do you mean you want a loop for rolling

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Chris Devers
On Thu, 9 Sep 2004, Robert Page IV wrote: I am familiar with . What is the difference between and ? It's an XHTML / XML -ism. In strict XML markup -- of which XHTML is one example -- all tags have to be balanced. For HTML, this means that tags that it used to be okay to leave unbalanced -- para