Hi
Does anyone have any cool and helpful links / URLS for Session Handling and
populating a table?
I would like to build a page for authorization.
Kind Regards
Brent Clark
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Wondering how I can show custom error message if session file doesn' exist.
http://search.cpan.org/~cwest/Apache-Session/Session/File.pm
If session file doesn't exist:
using CGI::Carp qw(fatalsToBrowser);
Software error:
Object does not exist in the data store at
/usr/share/perl5/Apache/Sessio
Robert Page IV wrote:
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.
There are quite a few modules that do this too, like Markdown, Textism,
and some of the wiki-markup tools. I've w
On Sep 9, 2004, at 11:02 PM, Robert Page IV wrote:
I am familiar with . What is the difference between and ?
In XHTML, all elements need a close. By doing , it will work
regardless of whether your DTD is for an HTML variant or XHTML. I
didn't know which you were using, so played it safe.
Ch
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
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
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
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
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
--
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
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
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
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
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
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
-Original Message-
From: Robert Page IV [mailto:[EMAIL PROTECTED]
Sent: 09 September 2004 03:19
To: Sean Davis
Cc: [EMAIL PROTECTED]
Subject: Re: CGI.pm : Handling Carriage Returns from textarea()
On Sep 6, 2004, at 8:52 PM, Sean Davis wrote:
> White space (including carri
> "Robert" == Robert Page IV <[EMAIL PROTECTED]> writes:
Robert> Woops! XMP is deprecated with HTMl 4.01.
Robert> Sorry for the extra message.
XMP has been deprecated for over half the age of the web. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL
ring returned from a textarea, assign the value to
either
a variable or array and output it to a web page with print or
printf or
sprintf/print.
When I do this, apparently carriage returns are either not captured
in
as part of the value
returned from the textarea value, or I am not handling the va
intf/print.
When I do this, apparently carriage returns are either not captured
in
as part of the value
returned from the textarea value, or I am not handling the value
returned correctly to recognize
carriage returns.
Does anyone have any recommendations as to how I can solve this
issu
d output it to a web page with print or printf
or
sprintf/print.
When I do this, apparently carriage returns are either not captured in
as part of the value
returned from the textarea value, or I am not handling the value
returned correctly to recognize
carriage returns.
Does anyone have any re
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 purposes, I print $summary and $detail. I may make t
do this, apparently carriage returns are either not captured
in as part of the value returned from the textarea value, or I am
not handling the value returned correctly to recognize carriage
returns.
Does anyone have any recommendations as to how I can solve this
issue?
This discussion in
tput it to a web page with print or printf
or
sprintf/print.
When I do this, apparently carriage returns are either not captured in
as part of the value
returned from the textarea value, or I am not handling the value
returned correctly to recognize
carriage returns.
Does anyone have any recommendat
When I do this, apparently carriage returns are either
: not captured in as part of the value returned from the
: textarea value, or I am not handling the value
: returned correctly to recognize carriage returns.
:
: Does anyone have any recommendations as to how I can
: solve this issue?
returns are either not captured
in as part of the value returned from the textarea value, or I am
not handling the value returned correctly to recognize carriage
returns.
Does anyone have any recommendations as to how I can solve this
issue?
This discussion in comp.lang.perl.misc may be helpful:
http
gt; as part of the value
> returned from the textarea value, or I am not handling the value
> returned correctly to recognize
> carriage returns.
>
> Does anyone have any recommendations as to how I can solve this issue?
>
>
> Robert C. Page IV
>
--
To unsubscribe
captured in
as part of the value
returned from the textarea value, or I am not handling the value
returned correctly to recognize
carriage returns.
Does anyone have any recommendations as to how I can solve this issue?
Robert C. Page IV
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
> "Andrew" == Andrew Gaffney <[EMAIL PROTECTED]> writes:
Andrew> I have a Perl script which uses the CGI module which needs to be able
Andrew> to get all the selected items in a SELECT. I see that the request
Andrew> comes in as 'selectname=item1&selectname=item2&selectname=item3'. If I
Andrew
Wiggins d Anconia wrote:
I have a Perl script which uses the CGI module which needs to be able
to get all the
selected items in a SELECT. I see that the request comes in as
'selectname=item1&selectname=item2&selectname=item3'. If I do '$p =
$cgi->Vars', wouldn't
I only get the last value?
F
Charles K. Clarkson wrote:
Andrew Gaffney [mailto:[EMAIL PROTECTED]
:
: I have a Perl script which uses the CGI module which needs to
: be able to get all the
: selected items in a SELECT. I see that the request comes in as
: 'selectname=item1&selectname=item2&selectname=item3'. If I do
: '$p
> I have a Perl script which uses the CGI module which needs to be able
to get all the
> selected items in a SELECT. I see that the request comes in as
> 'selectname=item1&selectname=item2&selectname=item3'. If I do '$p =
$cgi->Vars', wouldn't
> I only get the last value?
>From the CGI.pm doc
Andrew Gaffney [mailto:[EMAIL PROTECTED]
:
: I have a Perl script which uses the CGI module which needs to
: be able to get all the
: selected items in a SELECT. I see that the request comes in as
: 'selectname=item1&selectname=item2&selectname=item3'. If I do
: '$p = $cgi->Vars', wouldn't
:
I have a Perl script which uses the CGI module which needs to be able to get all the
selected items in a SELECT. I see that the request comes in as
'selectname=item1&selectname=item2&selectname=item3'. If I do '$p = $cgi->Vars', wouldn't
I only get the last value?
--
Andrew Gaffney
Network Admi
> "Charles" == Charles Harvey <[EMAIL PROTECTED]> writes:
Charles> I am trying empty a directory with over 4000 files with a script, and
Charles> do not understand why I can only delete half at a time. I am guessing
Charles> that the directory handle has a size limitation?? Is there a way to
Hello all,
I am trying empty a directory with over 4000 files with a script, and
do not understand why I can only delete half at a time. I am guessing
that the directory handle has a size limitation?? Is there a way to
load the contents into a large array or am I going about this all
wrong?
On Wednesday, Nov 5, 2003, at 11:55 US/Pacific, Shaun Fryer wrote:
[..]
What I hoped to have happen is that if a particular sub returns
empty, undef, or void, I will have it trigger the following sub.
What I'm unsure of, is how to get the die_msg/ to pass
to Die_Mail().
[..]
Return_Something() || D
I'd like to setup customised exception handling, but am unsure
how to impliment it. I started by reading `perldoc -f die` and
went from there, but the explanation of what I want to do is a
bit over my head. So, I'm looking for pointers, code, favoured
modules, and/or more suggest
#x27;t care if the user enters 45 &'s...b/c the regexp won't even look at
them.
Regards,
Danny
-Original Message-
From: John Stokes [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 7:56 PM
To: [EMAIL PROTECTED]
Subject: Re: Handling & =
If I do that, then all of
dy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "John Stokes" <[EMAIL PROTECTED]>
To: "Larry Coffin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, December 10, 2002 8:10 PM
Subject: Re: Handling & =
Really?
How could
Oh! Didn't think about that.
Yes, that looks like a very workable solution.
Thanks again.
-John
On 12/10/02 11:33 AM, "Larry Coffin" <[EMAIL PROTECTED]> wrote:
> At 2:15 PM -0500 12/10/02, John Stokes wrote:
>> Ah yes... That makes sense.
>>
>> That's the solution I've used in other cases (fo
At 2:15 PM -0500 12/10/02, John Stokes wrote:
>Ah yes... That makes sense.
>
>That's the solution I've used in other cases (for instance, resolving a CGI
>param to a path.) Unfortunately, it's not really practical to define a bunch
>of temporary variables for a form that may have hundreds (literall
Ah yes... That makes sense.
That's the solution I've used in other cases (for instance, resolving a CGI
param to a path.) Unfortunately, it's not really practical to define a bunch
of temporary variables for a form that may have hundreds (literally) of
input fields.
So, it looks like I'm back to
>Print >> End_form;
>
>Name: $q->param("name")
>
>End_form
That's because you can't execute perl code within this construct.
It is essentially a double quoted string that just happens to span multiple
lines. So, this doesn't work just like:
print "Name $q->param('name')\n";
won't
Nope, no luck.
When I use something like:
Print >> End_form;
Name: $q->param("name")
End_form
My output looks like:
Name: CGI=HASH(0x6590)->param("name")
I think I tried this before and that's why I didn't use CGI.pm for variable
processing.
But hey... I'm open to correction!
-John
On 1
Well, I'm not all that familiar with the CGI.pm html generation
functions, but if they simply generate HTML elements, there should be no
reason you can't mix CGI.pm calls with your own html code. Something like:
---
#!/usr/bin/perl
use CGI;
$q = new CGI;
open(OUTPUTFILE, ">
Really?
How could I mix something like:
print OUTPUTFILE $q->start_html('Application');
print OUTPUTFILE $q->center(
$q->h2("My Company Name"),
$q->p($q->strong("Application")),
);
print OUTPUTFILE $q->p("Applicant's Name: ",$q->b($q->param("Name"));
With something like print >> End_of_form? Is
>In terms of "why reinvent the wheel", I prefer not to use CGI.pm for simple
>form processing because it prevents me from doing something like
>
>print >> End_of_form
>
>...lots of HTML code...
>
>End_of_form
It does? Then I must be programming in something other than Perl
because I use th
Ah - I see the problem. I do a regex to replace all hex encoded characters
BEFORE I split on &, thusly all %26's are replaced with & before I do the
split.
In terms of "why reinvent the wheel", I prefer not to use CGI.pm for simple
form processing because it prevents me from doing something like
okes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 10, 2002 2:31 AM
Subject: Handling & =
I have an ongoing problem.
As you know, HTML encodes GET and POST requests using the format:
"myurl.com?name1=value1&name2=value2&..."
My problem i
Do you know what browser(s)? Most browsers should encode the & as "%26"
and then your split would work properly. On a side note why re-invent
the wheel, when it has already been invented lots of times, see CGI
module on CPAN, or any one of the hundreds of CGI sites that give you
source code t
If I do that, then all of them would be replaced and I'd have the same
problem with the - then.
How do I distinguish between an & that HTML inserted as a delimiter vs. an &
the user entered? (or an =, for that matter)
-John
On 12/9/02 4:50 PM, "Sven Bentlage" <[EMAIL PROTECTED]> wrote:
> Hi Joh
Hi John
why don`t you use a small regex to replace the & ?
Something like :
if ($variable =~ m/&/) {$variable =~ s/&/-/g}
should replace the ampersand with a "-". (I am not quite sure if you
have to write & or \& )
Cheers,
Sven
(P.S.: I am definitely sure there are much faster, shorter an
I have an ongoing problem.
As you know, HTML encodes GET and POST requests using the format:
"myurl.com?name1=value1&name2=value2&..."
My problem is, I have users constantly using ampersands (&) in text fields
(ex: John & Jane Doe), so my data comes across as:
"?name1=value1&name2=val&ue2=&name3=
Hi !!
Well, I am not sure how to pose this question properly, but let me
give it a try.
I am have a cgi that reads the file and loads it into a mysql database.
The entire file is read as an object and the methods associated with
that object then does all the work like chacking the data formats
and
August 14, 2001 10:52 AM
> To: Perl Cgi
> Subject: Best Practices: Error Handling???
>
>
>
> I've been perusing the Camel book, the Cookbook, CGI Programming
> w/Perl, and
> Effective Perl for answers to this question, but have yet to find
> one or two
> definitiv
I've been perusing the Camel book, the Cookbook, CGI Programming w/Perl, and
Effective Perl for answers to this question, but have yet to find one or two
definitive solutions. I've seen the standard die/eval() statements and the
use of the various incarnations of Carp, but I have yet to see anyon
Apache::ASP
- Original Message -
From: "Gary Stainburn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 10, 2001 10:40 AM
Subject: Session Handling like PHP
> Hi all,
>
> I've just seen a presentation at my local LUG showing
57 matches
Mail list logo