Re: CGI.pm and scrolling list box code error

2011-05-31 Thread Dr.Ruud
On 2011-05-31 02:48, John M Rathbun MD wrote: I'm an [...] trying to convert some of my old BASIC programs to run in a browser Use JavaScript? -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: CGI.pm and scrolling list box code error

2011-05-30 Thread Shlomi Fish
Hi John, On Tuesday 31 May 2011 03:48:44 John M Rathbun MD wrote: > Hello, World! > > I'm an amateur programmer trying to convert some of my old BASIC > programs to run in a browser so people don't have to download and > install software. I'm having a problem with my current project because > CGI

Re: CGI.pm and scrolling list box code error

2011-05-30 Thread Michael Greb
On Mon, May 30, 2011 at 08:48:44PM -0400, John M Rathbun MD wrote: >print scrolling_list(-name => 'choose',-values=>@terms,-size=>254); scrolling_list wants a reference for the value list: print scrolling_list(-name => 'choose',-values=>\@terms,-size=>254); This should do what you want, w

Re: CGI.pm and scrolling list box code error

2011-05-30 Thread Uri Guttman
> "JMRM" == John M Rathbun MD writes: JMRM> I'm an amateur programmer trying to convert some of my old BASIC JMRM> programs to run in a browser so people don't have to download and JMRM> install software. I'm having a problem with my current project because JMRM> CGI.pm is generating

Re: CGI.pm post types

2009-12-30 Thread Shlomi Fish
On Thursday 31 Dec 2009 00:44:31 Bruce Ferrell wrote: > Shlomi Fish wrote: > > On Thursday 31 Dec 2009 00:28:51 Bruce Ferrell wrote: > >> I see on the CGI web page that this: > >> === > >> use CGI; > >> > >> $q = new CGI; > >> > >> $query = $q->param( 'POSTDATA' ); >

Re: CGI.pm post types

2009-12-30 Thread Jeremiah Foster
On Dec 30, 2009, at 23:28, Bruce Ferrell wrote: > I see on the CGI web page that this: > === > use CGI; > > $q = new CGI; > > $query = $q->param( 'POSTDATA' ); > === > > > will return the contents of this URI: > > http://server/

Re: CGI.pm post types

2009-12-30 Thread Bruce Ferrell
Shlomi Fish wrote: > On Thursday 31 Dec 2009 00:28:51 Bruce Ferrell wrote: >> I see on the CGI web page that this: >> === >> use CGI; >> >> $q = new CGI; >> >> $query = $q->param( 'POSTDATA' ); >> === >> >> >> will return the content

Re: CGI.pm post types

2009-12-30 Thread Shlomi Fish
On Thursday 31 Dec 2009 00:28:51 Bruce Ferrell wrote: > I see on the CGI web page that this: > === > use CGI; > > $q = new CGI; > > $query = $q->param( 'POSTDATA' ); > === > > > will return the contents of this URI: > > http://ser

RE: CGI.pm

2005-03-29 Thread Chris Devers
On Tue, 29 Mar 2005, Chris Heiland wrote: > Untested: > > if ($query->request_method() =~ m/^post$/i) { > do something; > } If you're matching against a known, fixed pattern, the string comparison operators will almost always be faster and clearer than the equivalent regex. In this cas

Re: CGI.pm

2005-03-29 Thread Chris Knipe
DOH! Something Silly(tm) Thanks ;) - Original Message - From: "Chris Devers" <[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]> Cc: "Perl Beginners List" Sent: Tuesday, March 29, 2005 9:07 PM Subject: Re: CGI.pm On Tue, 29 Mar 2005, Chri

RE: CGI.pm

2005-03-29 Thread Chris Heiland
> -Original Message- > From: Chris Knipe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 29, 2005 11:01 AM > To: beginners@perl.org > Subject: Re: CGI.pm > > Strange indeed. > > For further debuging, I did: > > print $ENV{REQUEST_METHOD}; >

Re: CGI.pm

2005-03-29 Thread Chris Knipe
-- Chris. I love deadlines. I especially love the whooshing sound they make as they fly by..." - Douglas Adams, 'Hitchhiker's Guide to the Galaxy' - Original Message - From: "Chris Knipe" <[EMAIL PROTECTED]> To: Sent: Tuesday, March 29, 2005 9:00 PM

Re: CGI.pm

2005-03-29 Thread Chris Devers
On Tue, 29 Mar 2005, Chris Knipe wrote: > if (!$Query->request_method() eq "POST") { > exit; > } > > Using a GET / HEAD method, the IF statement never executes. Nor would it -- the exclamation point isn't in the right place. This statement is saying "if not-$query->request_method() equals POST

Re: CGI.pm

2005-03-29 Thread Chris Knipe
Chris. I love deadlines. I especially love the whooshing sound they make as they fly by..." - Douglas Adams, 'Hitchhiker's Guide to the Galaxy' - Original Message - From: "Chris Heiland" <[EMAIL PROTECTED]> To: Sent: Tuesday, March 29, 2005 8:5

RE: CGI.pm

2005-03-29 Thread Chris Heiland
> -Original Message- > From: Chris Knipe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 29, 2005 10:45 AM > To: beginners@perl.org > Subject: CGI.pm > > Lo all, > > Very quickly > > #!/usr/bin/perl > use CGI; > use strict; > use warnings; > > my $Query = new CGI; > if (!$Query

RE: CGI.pm and form creation

2005-01-17 Thread Moon, John
I'm trying to create a little form usign CGI.pm but I get this error from apache: malformed header from script. Bad header='usr',-checked=>1), checkbox(-name=>'sys',-checked=>0), checkbox(-name=>'wio',-checked=>0), checkbox(-name=>'idle',-checked=>0), reset(-nam

Re: CGI.pm and form creation

2005-01-17 Thread Tor Hildrum
On Mon, 17 Jan 2005 14:41:40 +0100, Mauro <[EMAIL PROTECTED]> wrote: > I'm trying to create a little form usign CGI.pm but I get this error from > apache: > malformed header from script. Bad header= checkbox(-name=>'usr',-checked=>1), > checkbox(-name=>'sys',-checked=>0), >

Re: CGI.pm info on the web

2004-10-26 Thread Randal L. Schwartz
> "Jenda" == Jenda Krynicky <[EMAIL PROTECTED]> writes: Jenda> Opinions differ. I think including these "HTML generation" functions Jenda> in CGI.pm was a bad design decision (a module should do only one Jenda> thing) and that they are hard to read and maintain. I'll be the one that disagr

Re: CGI.pm info on the web

2004-10-26 Thread Jenda Krynicky
From: "Adamiec, Larry" <[EMAIL PROTECTED]> > This link may be of help to some people. > > http://www.samag.com/documents/s=9408/ur0411l/ Opinions differ. I think including these "HTML generation" functions in CGI.pm was a bad design decision (a module should do only one thing) and that they are

Re: CGI.pm info on the web

2004-10-26 Thread Chris Devers
On Tue, 26 Oct 2004, Adamiec, Larry wrote: > This link may be of help to some people. > > http://www.samag.com/documents/s=9408/ur0411l/ I bet it would go over even better on the CGI list :-) -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Re: CGI.pm help

2004-06-28 Thread JupiterHost.Net
use FIle::Slurp; print $q->header(); print read_file('../htmltop.html'); # generate content here print read_file('../htmlbot.html'); HTH Lee.M - JupiterHost.Net Man That is super slick. Thanks very much that is exactly what I am looking for. No problem! Sorry for the misspelling the File:

RE: CGI.pm help

2004-06-28 Thread John Pretti
-Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 2:17 PM To: John Pretti Cc: 'Wiggins d Anconia'; [EMAIL PROTECTED] Subject: Re: CGI.pm help >>Hi all, >> >>I have written an upload script using CGI.pm and it w

Re: CGI.pm help

2004-06-28 Thread JupiterHost.Net
use FIle::Slurp; Whoops : use File::Slurp; :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI.pm help

2004-06-28 Thread JupiterHost.Net
Hi all, I have written an upload script using CGI.pm and it works perfect however it looks bland. I would like ot understand how to make it look a lot nicer, either continuing down the CGI.pm path or using some other method. Any ideas? What looks bland? Pretty much everything dealing with the loo

RE: CGI.pm help

2004-06-28 Thread John Pretti
-Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 1:46 PM To: John Pretti; [EMAIL PROTECTED] Subject: Re: CGI.pm help > > Hi all, > > I have written an upload script using CGI.pm and it works perfect however it > looks

Re: CGI.pm help

2004-06-28 Thread Wiggins d Anconia
> > Hi all, > > I have written an upload script using CGI.pm and it works perfect however it > looks bland. I would like ot understand how to make it look a lot nicer, > either continuing down the CGI.pm path or using some other method. Any > ideas? > What looks bland? Pretty much everything

RE: CGI.PM and HTML Templates

2004-06-18 Thread Charles K. Clarkson
John Pretti <[EMAIL PROTECTED]> wrote: : Can someone point me in the right direction of converting : the following script to use an html template? You don't need html templates for this. Your pages are static. They don't have any information added to them by the cgi program. You can remove th

RE: CGI.pm / Upload File / delete temporary file (CGITemp****)

2004-05-16 Thread Toby Stuart
> -Original Message- > From: Babale Fongo [mailto:[EMAIL PROTECTED] > Sent: Friday, May 14, 2004 10:08 PM > To: [EMAIL PROTECTED] > Subject: CGI.pm / Upload File / delete temporary file (CGITemp) > > > > > > You don't have to bother about deleting it. GCI.pm takes care of that. >

Re: CGI.pm - Remote_Addr

2004-04-03 Thread WC -Sx- Jones
Mark Weisman wrote: trying to pull a remote_addr with CGI.pm, however, the machine I'm doing it on is behind a firewall. The Remote_addr keeps showing the firewall address regardless where I login from. How do I set up the net to grab the right remote_addr on the server? I'm using NATD and IPFW at

RE: CGI.pm param

2002-12-20 Thread Dan Muey
an array but only if you havn't done any kind of manipulation to it in scalar contect previously Foreach $p(@params) { ... Thanks Dan -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 2:58 PM To: [EMAIL PROTECTED] Subject: Re: CGI.pm param

Re: CGI.pm param

2002-12-20 Thread Rob Dixon
Dan Dan Have you generated a checkbox with $cgi->checkbox (-name => 'checkboxname', ...) because this will create only an isolated single checkbox. To create a group of checkboxes use $cgi->checkbox_group (-name => 'groupname', ...) which will then return a list of only the _checked_

Re: CGI.pm & PPM

2002-04-02 Thread drieux
On Tuesday, April 2, 2002, at 07:58 , Bob T wrote: > In order to have perl work as a cgi scripter are any modules besides CGI. > pm > actually needed?? I dropped it all off of vladimir, then had to run back to the CPAN to pick Up: HTML-Tagset-3.03 URI-1.18 Compress-Zlib-1.16HTML-Tr

Re: CGI.pm problems continued

2001-11-21 Thread birgit kellner
--On Dienstag, 20. November 2001 23:13 -0500 "Scott R. Godin" <[EMAIL PROTECTED]> wrote: > well if you do it as $in, it passes a reference. if you do it as %in, it > passes the hash. I tend to find the referenced value more > straightforward to work with when using the object-oriented CGI.pm > i

Re: CGI.pm problems continued

2001-11-21 Thread Scott R. Godin
In article <3852920.1006256205@[10.0.0.140]>, [EMAIL PROTECTED] (Birgit Kellner) wrote: > Sorry for being stubborn, but I' like to decode multivalued parameters > *without* identifying them by name. > That's precisely why reading multiple values into an array is not > applicable. that depends

Re: CGI.pm problems continued

2001-11-20 Thread birgit kellner
--On Montag, 19. November 2001 21:09 -0500 "Scott R. Godin" <[EMAIL PROTECTED]> wrote: ># !/usr/bin/perl -w > use strict; > use CGI 2.78 qw(:standard :cgi-lib -no_xhtml); ># if this errors, remove the 2.78 ># what version of CGI.pm does your server have? > print $CGI::VERSION, " CGI.pm installed

Re: CGI.pm problems continued

2001-11-20 Thread Scott R. Godin
In article <56313003.1006216242@[10.0.0.140]>, [EMAIL PROTECTED] (Birgit Kellner) wrote: > I have tried the following code to read a query-string from a CGI request > into a hash, taking into account (a) multiple select fields without knowing > the field name, (b) getting rid of names without

Re: CGI.pm questions

2001-11-18 Thread Scott R. Godin
In article <3827643.100599@[10.0.0.140]>, [EMAIL PROTECTED] (Birgit Kellner) wrote: > I want to use CGI.pm to parse form input and store all name/value-pairs in > a hash. > > At present, the code I have reads like this: > > my $in = new CGI; > my %in = &parse_form; > > sub parse_form { >

RE: CGI.pm Question

2001-11-12 Thread blowther
rdering array ref that is the second parameter is optional. Since you can't assume ordering on a hash. I too would like suggestions on this approach if possible! Bruce W. Lowther OpenAuto Lead Micron Technology, Inc. Boise, Idaho [EMAIL PROTECTED] -Original Message- From: Andrea Holstein [m

Re: CGI.pm Question

2001-11-10 Thread Andrea Holstein
Jess Balint wrote: > > Hello all, I was wonder if there is a way to do this with less `$query->`'s. > And yes, I know the table's not perfect. Any input would be appreciated. > Thanks. > > ~Jess > > print $query->start_form, > $query->start_table({-border=>undef}), >

RE: CGI.pm Question

2001-11-09 Thread Curtis Poe
--- "Balint, Jess" <[EMAIL PROTECTED]> wrote: > Are there any downsides to not using the OO syntax? Not using the OO syntax can have some problems. First, you're importing the functions into your programs namespace. Consider: #!/usr/bin/perl -wT use strict; use CGI qw/:standard/;

RE: CGI.pm Question

2001-11-09 Thread Jeff 'japhy' Pinyan
On Nov 9, Balint, Jess said: >Are there any downsides to not using the OO syntax? Well, importing a bunch of functions does what's called "polluting a namespace". I puts a bunch of functions at your disposal, but at the price of... well, putting them there. You'd better make sure you don't alr

RE: CGI.pm Question

2001-11-09 Thread Balint, Jess
Are there any downsides to not using the OO syntax? -Original Message- From: Curtis Poe [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 2:40 PM To: [EMAIL PROTECTED]; Balint, Jess Cc: '[EMAIL PROTECTED]' Subject: Re: CGI.pm Question -- Jeff 'japhy' Piny

Re: CGI.pm Question

2001-11-09 Thread Curtis Poe
-- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Nov 9, Balint, Jess said: > > >Hello all, I was wonder if there is a way to do this with less `$query->`'s. > >And yes, I know the table's not perfect. Any input would be appreciated. > >Thanks. > > Don't use the OO syntax then. > > use C

Re: CGI.pm Question

2001-11-09 Thread Jeff 'japhy' Pinyan
On Nov 9, Balint, Jess said: >Hello all, I was wonder if there is a way to do this with less `$query->`'s. >And yes, I know the table's not perfect. Any input would be appreciated. >Thanks. Don't use the OO syntax then. use CGI qw( :standard ); print start_form, start_table(...),

Re: CGI.pm and form validation

2001-07-16 Thread Ondrej Par
joni > > -Original Message- > From: Pete Sergeant [mailto:[EMAIL PROTECTED]] > Sent: 13 July 2001 15:43 > To: [EMAIL PROTECTED] > Subject: Re: CGI.pm and form validation > > > > That which I say three times it true: > > Do not trust user input. Do N

RE: CGI.pm and form validation

2001-07-16 Thread PURMONEN, Joni
cks which would help making the form more secure in the server end? joni -Original Message- From: Pete Sergeant [mailto:[EMAIL PROTECTED]] Sent: 13 July 2001 15:43 To: [EMAIL PROTECTED] Subject: Re: CGI.pm and form validation That which I say three times it true: Do not trust user inpu

RE: CGI.pm and form validation

2001-07-13 Thread John Edwards
Doing this you get the best of both worlds. Speed for the client in simple form validation and security on the server. I think you need to drink less coffee dude... John -Original Message- From: Pete Sergeant [mailto:[EMAIL PROTECTED]] Sent: 13 July 2001 15:43 To: [EMAIL PROTECTED] Subjec

Re: CGI.pm and form validation

2001-07-13 Thread Pete Sergeant
That which I say three times it true: Do not trust user input. Do NOT trust user input. DO NOT TRUST USER INPUT. As mentioned, users can turn off javascript. You're assuming of course that skr!pT k1DD13s use browsers. It is trivial to build an HTTP request and telnet into the server at port 80.

Re: CGI.pm and form validation

2001-07-13 Thread K.L. Hayes
Hello Jim, I noticed a response telling you to use JavaScript to validate your form input. Personally I browse with my JavaScript turned off to avoid pop-up ads so I don't believe it is a good idea to try to validate information using it. Here is an excerpt from my Sams book that could help you

RE: CGI.pm and form validation

2001-07-13 Thread Brett W. McCoy
On Fri, 13 Jul 2001, John Edwards wrote: > I would do this using Javascript in the form. > > The advantage of this is the form data is validated without the client > having to return the form to the server, which then would have to validate > and return the the client the errors. With JS you can

RE: CGI.pm and form validation

2001-07-13 Thread John Edwards
I would do this using Javascript in the form. The advantage of this is the form data is validated without the client having to return the form to the server, which then would have to validate and return the the client the errors. With JS you can do it all client-side and only allow the form to be