Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Perl on OSX > Re: CGI.pm
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 6 Topic 994 of 1076
Post > Topic >>

Re: CGI.pm

by jeremiah@[EMAIL PROTECTED] (Jeremiah Foster) Sep 27, 2007 at 11:13 PM

--Apple-Mail-5-19534149
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

 From perldoc CGI:

       A Lurking Trap! Some of the form-element generating methods  
return multiple tags.  In a scalar context, the tags will be  
concatenated together with spaces, or whatever is the current value  
of the $" global.  In a list context, the methods will return a list  
of elements, allowing you to modify them if you wish.  Usually you  
will not notice this behavior, but beware of this:

            printf("%s\n",end_form())

        end_form() produces several tags, and only the first of them  
will be printed because the format only expects one value.


On Sep 27, 2007, at 6:41 PM, Michael Barto wrote:

> Perl snippet question:
>
> ---------------------------------------------
> #!/usr/bin/perl -w
>
> use strict;
> use CGI;
> use CGI::Carp 'fatalsToBrowser';
>
>
> my $new_page = new CGI("");
> sub HTMLendFORM ($) {
>     my $new_page = $_[0];
>     print $new_page->end_form;
> }
>
>
> HTMLendFORM ($new_page);
>
> print "\n\n";
> ---------------------------------------------
>
> This above code produces "<div></div></form>". This ti me is odd,  
> since i only really want </form>. Does anyone have an explanation  
> or another way to use the CGI.pm library and produce only </form>.  
> Yes I could just use a print statement. But I am kind of curious to  
> why?
> -- 
> Michael Barto
> Software Architect
>
> <circle.gif>
> LogiQwest Inc.
> 16458 Bolsa Chica Street, # 15
> Huntington Beach, CA  92649
> http://www.logiqwest.com/
>
>    	mbarto@[EMAIL PROTECTED]
> Tel:  714 377 3705
> Fax: 714 840 3937
> Cell: 714 883 1949
>
> 'tis a gift to be simple
> This e-mail may contain LogiQwest proprietary information and  
> should be treated as confidential.


--Apple-Mail-5-19534149--
 




 6 Posts in Topic:
CGI.pm
mbarto@[EMAIL PROTECTED]   2007-09-27 09:41:53 
Re: CGI.pm
jeremiah@[EMAIL PROTECTED  2007-09-27 23:02:49 
Re: CGI.pm
mbarto@[EMAIL PROTECTED]   2007-09-27 23:17:11 
Re: CGI.pm
jeremiah@[EMAIL PROTECTED  2007-09-28 13:54:03 
Re: CGI.pm
jeremiah@[EMAIL PROTECTED  2007-09-27 23:13:35 
Re: CGI.pm
jszinger@[EMAIL PROTECTED  2007-09-27 21:45:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 0:11:34 CST 2008.