CGI.pm

--------------040201040100050404030104
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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

	LogiQwest Circle
LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649
http://www.logiqwest.com/

	    	mbarto@logiqwest.com <mailto:mbarto@logiqwest.com>
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.


--------------040201040100050404030104
Content-Type: multipart/related;
 boundary="------------080008060701020504050901"


--------------080008060701020504050901
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Perl snippet question:<br>
<br>
<tt>---------------------------------------------</tt><br>
<tt>#!/usr/bin/perl -w<br>
<br>
use strict;<br>
use CGI;<br>
use CGI::Carp 'fatalsToBrowser';<br>
<br>
<br>
my $new_page = new CGI("");<br>
sub HTMLendFORM ($) {<br>
&nbsp;&nbsp;&nbsp; my $new_page = $_[0];<br>
&nbsp;&nbsp;&nbsp; print $new_page-&gt;end_form;<br>
}<br>
<br>
<br>
HTMLendFORM ($new_page);<br>
<br>
print "\n\n";</tt><br>
<tt>---------------------------------------------</tt><br>
<br>
This above code produces "&lt;div&gt;&lt;/div&gt;&lt;/form&gt;". This
ti me is odd, since i only really want &lt;/form&gt;. Does anyone have
an explanation or another way to use the CGI.pm library and produce
only &lt;/form&gt;. Yes I could just use a print statement. But I am
kind of curious to why?<br>
<div class="moz-signature">-- <br>
<meta content="text/html;" http-equiv="Content-Type">
<title></title>
<div class="moz-signature">
<div class="moz-signature">
<table border="0" cellpadding="0" cellspacing="0" width="490">
  <tbody>
    <tr>
      <td colspan="4" width="490">
      <hr color="#cccccc"></td>
    </tr>
    <tr>
      <td colspan="3" align="left" valign="top" width="390"><font
 face="arial, helvetica, sans-serif"><font size="3"><b>Michael Barto</b><br>
      </font><font size="2">Software Architect<br>
      <br>
      </font></font></td>
      <td rowspan="2" align="right" valign="middle" width="100"><img
 alt="LogiQwest Circle" src="cid:part1.08010107.07060403@logiqwest.com"
 height="80" width="81"><br>
      </td>
    </tr>
    <tr>
      <td align="left" valign="top" width="220"><font
 face="arial, helvetica, sans-serif"> <font color="#003366" size="2">LogiQwest
Inc.<br>
16458 Bolsa Chica Street, # 15<br>
Huntington Beach, CA&nbsp;&nbsp;92649<br>
      <a href="http://www.logiqwest.com/">http://www.logiqwest.com/</a><br>
      <br>
      </font></font></td>
      <td width="10">&nbsp;&nbsp;&nbsp;</td>
      <td align="left" valign="top" width="160"><font
 face="arial, helvetica, sans-serif"><font color="#003366" size="2"><a
 href="mailto:mbarto@logiqwest.com">mbarto@logiqwest.com</a><br>
Tel:&nbsp;&nbsp;714 377 3705<br>
Fax:&nbsp;714 840 3937<br>
Cell: 714 883 1949<br>
      <br>
      </font></font></td>
    </tr>
    <tr>
      <td colspan="4" align="right" width="490"><font color="#ff6633"
 face="arial, helvetica, sans-serif" size="2"><strong>'tis a gift to be
simple</strong></font>
      <hr color="#cccccc"> </td>
    </tr>
    <tr>
      <td colspan="4" align="center" width="490"> <font
 face="arial, helvetica, sans-serif" size="1">This e-mail may contain
LogiQwest
proprietary information and should be treated as confidential.</font> </td>
    </tr>
  </tbody>
</table>
</div>
</div>
</div>
</body>
</html>

--------------080008060701020504050901
Content-Type: image/gif; x-mac-type="47494666"; x-mac-creator="70727677";
 name="circle.gif"
Content-Transfer-Encoding: base64
Content-ID: <part1.08010107.07060403@logiqwest.com>
Content-Disposition: inline;
 filename="circle.gif"

R0lGODlhUQBQAJEAAAAAAP////1HA////yH5BAEAAAMALAAAAABRAFAAAAL/jI+pyybSopy0
OvWy3bwfmGSPR5bMGIrmaqEhpqWgM7Ocii0uggexvdm9WrsfsCLk3VLHW43ZjCp5T6qsijSu
fiKt75qcdI/cMYzaI6ZLRvP54w56Pen4FI11eZPzRtwO9wYD0jcoh9OF5aN4UhOm89hoBtHH
KEWXeLFGo3PZkeg4xxcpZqmmtfkFhllIAbgYJvRa2hqRCRn7NCuRmvXaO2jqR0p7C1trBZlc
CgWGqJInvIxMM9MKesxIjAYnDdvNO7Z74jfkWhT+TN3t3WmTGlk0PrwuiRofCmyrX1zV68/P
Xjtnun4ZIhGQ3h6DQZrdCQSRYLBYTrjRAreo2p+E/1mWhbOoB1S+cg0vhcSG0R0eT43AGStU
kOM7ayg2ntpGhqZFdio14gTyqIcxj8cQGsVFaOgHcphYaJik1BNKJy+jqlKTrY3IZxLZUep5
jpNYK/KWOlsVbRWUkDIyRlS0JunVdBQvmJ3i7+7BpfWsPjQp61tLr6YGfnqq1hxPluc2imK8
ZahfyKwkAyJWU6dZN5nH4oH6r7Bcpno150LpV7SSghm/jkWMVNastKqgYbudGdjlf8rIZpsr
e/PFxK6Q0MEabLDiiHaZzU0Xey9z5rn3HF64sHcOiJOpan3MJu/2n1k/g23+cXnk76O0N6NN
Gnn57f30cofNivB55dOvrFzXTx9ReVBWzUr7KSMMeb60ZUIdABEIj3vPeUagT3xIGF9/UUxl
31qucfUbYJWQ81SJJmpiWFP7KVghhm6JsWKLtmQ4QigyluRQbX/dyItxE/LYIGspAknSjlEU
AAA7
--------------080008060701020504050901--

--------------040201040100050404030104--
0
mbarto
9/27/2007 4:41:53 PM
perl.macosx 2309 articles. 0 followers. Follow

5 Replies
3759 Views

Similar Articles

[PageSpeed] 13

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?
>

Why are you doing it this way? You do not need a sub and it is best  
to use $q (or the functional interface) since if anyone has to read  
your code they will recognize $q immediately but wonder what  
$new_page is for. And why are you printing two new lines? New lines  
do not show up in HTML.

Try this:

print $q->end_form();

That usually produces </form>
0
jeremiah
9/27/2007 9:02:49 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@logiqwest.com
> 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--
0
jeremiah
9/27/2007 9:13:35 PM
On Sep 27, 10:41 am, mba...@logiqwest.com (Michael Barto) wrote:
> Perl snippet question:
>
[snip]
>
> 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?

You also see this with
$ perl -MCGI -le'print CGI::end_form'
<div></div></form>
$

According to the CGI.pm ChangeLog, this is a bug that was fixed in
3.12.
I think it has something to to with CGI.pm's sticky fields.

OSX 10.4 comes with CGI 3.05.  My Linux box with CGI 3.15 doesn't have
this problem.

0
jszinger
9/27/2007 9:45:07 PM
--------------060206030504040402050000
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

This seems like a flame, but I will try and answer your question. The 
reason why we are doing the HTML subroutines and so many others with key 
at the start (e.g. JSCript, DB, make, get). is mostly to support long 
term maintenance and parse out pieces of the code for a very large 
project (divide and conquer). The modules libraries are maintained in a 
consistent manner. The variables $new_page and $from_page also are 
significant in this large code. It just helps the many people that have 
to touch this code have an easier path getting though any maintenance. 
The main program is nothing more than large set subroutine calls broken 
down in sections. The  subroutine calls are shared by many modules of 
the large project.

Also, I really appreciate "jszinger@gmail.com" response as it did 
clarify the issue and was very helpful.

Jeremiah Foster wrote:
>
> 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?
>>
>
> Why are you doing it this way? You do not need a sub and it is best to 
> use $q (or the functional interface) since if anyone has to read your 
> code they will recognize $q immediately but wonder what $new_page is 
> for. And why are you printing two new lines? New lines do not show up 
> in HTML.
>
> Try this:
>
> print $q->end_form();
>
> That usually produces </form>
>

-- 
------------------------------------------------------------------------
*Michael Barto*
Software Architect

	LogiQwest Circle
LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649
http://www.logiqwest.com/

	    	mbarto@logiqwest.com <mailto:mbarto@logiqwest.com>
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.


--------------060206030504040402050000
Content-Type: multipart/related;
 boundary="------------080407070600010806070806"


--------------080407070600010806070806
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
This seems like a flame, but I will try and answer your question. The
reason why we are doing the HTML subroutines and so many others with
key at the start (e.g. JSCript, DB, make, get). is mostly to support
long term maintenance and parse out pieces of the code for a very large
project (divide and conquer). The modules libraries are maintained in a
consistent manner. The variables $new_page and $from_page also are
significant in this large code. It just helps the many people that have
to touch this code have an easier path getting though any maintenance.
The main program is nothing more than large set subroutine calls broken
down in sections. The&nbsp; subroutine calls are shared by many modules of
the large project.<br>
<br>
Also, I really appreciate <a class="moz-txt-link-rfc2396E" href="mailto:jszinger@gmail.com">"jszinger@gmail.com"</a> response as it did
clarify the issue and was very helpful. <br>
<br>
Jeremiah Foster wrote:
<blockquote
 cite="mid:7CFA04CF-E96B-4A85-BFAE-01A695A926BD@jeremiahfoster.com"
 type="cite"><br>
On Sep 27, 2007, at 6:41 PM, Michael Barto wrote:
  <br>
  <br>
  <blockquote type="cite">Perl snippet question:
    <br>
    <br>
---------------------------------------------
    <br>
#!/usr/bin/perl -w
    <br>
    <br>
use strict;
    <br>
use CGI;
    <br>
use CGI::Carp 'fatalsToBrowser';
    <br>
    <br>
    <br>
my $new_page = new CGI("");
    <br>
sub HTMLendFORM ($) {
    <br>
&nbsp;&nbsp;&nbsp; my $new_page = $_[0];
    <br>
&nbsp;&nbsp;&nbsp; print $new_page-&gt;end_form;
    <br>
}
    <br>
    <br>
    <br>
HTMLendFORM ($new_page);
    <br>
    <br>
print "\n\n";
    <br>
---------------------------------------------
    <br>
    <br>
This above code produces "&lt;div&gt;&lt;/div&gt;&lt;/form&gt;". This
ti me is odd, since i only really want &lt;/form&gt;. Does anyone have
an explanation or another way to use the CGI.pm library and produce
only &lt;/form&gt;. Yes I could just use a print statement. But I am
kind of curious to why?
    <br>
    <br>
  </blockquote>
  <br>
Why are you doing it this way? You do not need a sub and it is best to
use $q (or the functional interface) since if anyone has to read your
code they will recognize $q immediately but wonder what $new_page is
for. And why are you printing two new lines? New lines do not show up
in HTML.
  <br>
  <br>
Try this:
  <br>
  <br>
print $q-&gt;end_form();
  <br>
  <br>
That usually produces &lt;/form&gt;
  <br>
  <br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html;" http-equiv="Content-Type">
<title></title>
<div class="moz-signature">
<div class="moz-signature">
<table border="0" cellpadding="0" cellspacing="0" width="490">
  <tbody>
    <tr>
      <td colspan="4" width="490">
      <hr color="#cccccc"></td>
    </tr>
    <tr>
      <td colspan="3" align="left" valign="top" width="390"><font
 face="arial, helvetica, sans-serif"><font size="3"><b>Michael Barto</b><br>
      </font><font size="2">Software Architect<br>
      <br>
      </font></font></td>
      <td rowspan="2" align="right" valign="middle" width="100"><img
 alt="LogiQwest Circle" src="cid:part1.01070607.05020003@logiqwest.com"
 height="80" width="81"><br>
      </td>
    </tr>
    <tr>
      <td align="left" valign="top" width="220"><font
 face="arial, helvetica, sans-serif"> <font color="#003366" size="2">LogiQwest
Inc.<br>
16458 Bolsa Chica Street, # 15<br>
Huntington Beach, CA&nbsp;&nbsp;92649<br>
      <a href="http://www.logiqwest.com/">http://www.logiqwest.com/</a><br>
      <br>
      </font></font></td>
      <td width="10">&nbsp;&nbsp;&nbsp;</td>
      <td align="left" valign="top" width="160"><font
 face="arial, helvetica, sans-serif"><font color="#003366" size="2"><a
 href="mailto:mbarto@logiqwest.com">mbarto@logiqwest.com</a><br>
Tel:&nbsp;&nbsp;714 377 3705<br>
Fax:&nbsp;714 840 3937<br>
Cell: 714 883 1949<br>
      <br>
      </font></font></td>
    </tr>
    <tr>
      <td colspan="4" align="right" width="490"><font color="#ff6633"
 face="arial, helvetica, sans-serif" size="2"><strong>'tis a gift to be
simple</strong></font>
      <hr color="#cccccc"> </td>
    </tr>
    <tr>
      <td colspan="4" align="center" width="490"> <font
 face="arial, helvetica, sans-serif" size="1">This e-mail may contain
LogiQwest
proprietary information and should be treated as confidential.</font> </td>
    </tr>
  </tbody>
</table>
</div>
</div>
</div>
</body>
</html>

--------------080407070600010806070806
Content-Type: image/gif; x-mac-type="47494666"; x-mac-creator="70727677";
 name="circle.gif"
Content-Transfer-Encoding: base64
Content-ID: <part1.01070607.05020003@logiqwest.com>
Content-Disposition: inline;
 filename="circle.gif"

R0lGODlhUQBQAJEAAAAAAP////1HA////yH5BAEAAAMALAAAAABRAFAAAAL/jI+pyybSopy0
OvWy3bwfmGSPR5bMGIrmaqEhpqWgM7Ocii0uggexvdm9WrsfsCLk3VLHW43ZjCp5T6qsijSu
fiKt75qcdI/cMYzaI6ZLRvP54w56Pen4FI11eZPzRtwO9wYD0jcoh9OF5aN4UhOm89hoBtHH
KEWXeLFGo3PZkeg4xxcpZqmmtfkFhllIAbgYJvRa2hqRCRn7NCuRmvXaO2jqR0p7C1trBZlc
CgWGqJInvIxMM9MKesxIjAYnDdvNO7Z74jfkWhT+TN3t3WmTGlk0PrwuiRofCmyrX1zV68/P
Xjtnun4ZIhGQ3h6DQZrdCQSRYLBYTrjRAreo2p+E/1mWhbOoB1S+cg0vhcSG0R0eT43AGStU
kOM7ayg2ntpGhqZFdio14gTyqIcxj8cQGsVFaOgHcphYaJik1BNKJy+jqlKTrY3IZxLZUep5
jpNYK/KWOlsVbRWUkDIyRlS0JunVdBQvmJ3i7+7BpfWsPjQp61tLr6YGfnqq1hxPluc2imK8
ZahfyKwkAyJWU6dZN5nH4oH6r7Bcpno150LpV7SSghm/jkWMVNastKqgYbudGdjlf8rIZpsr
e/PFxK6Q0MEabLDiiHaZzU0Xey9z5rn3HF64sHcOiJOpan3MJu/2n1k/g23+cXnk76O0N6NN
Gnn57f30cofNivB55dOvrFzXTx9ReVBWzUr7KSMMeb60ZUIdABEIj3vPeUagT3xIGF9/UUxl
31qucfUbYJWQ81SJJmpiWFP7KVghhm6JsWKLtmQ4QigyluRQbX/dyItxE/LYIGspAknSjlEU
AAA7
--------------080407070600010806070806--

--------------060206030504040402050000--
0
mbarto
9/28/2007 6:17:11 AM
On Sep 28, 2007, at 8:17 AM, Michael Barto wrote:

> This seems like a flame, but I will try and answer your question.  
> The reason why we are doing the HTML subroutines and so many others  
> with key at the start (e.g. JSCript, DB, make, get). is mostly to  
> support long term maintenance and parse out pieces of the code for  
> a very large project (divide and conquer)
> The modules libraries are maintained in a consistent manner. The  
> variables $new_page and $from_page also are significant in this  
> large code. It just helps the many people that have to touch this  
> code have an easier path getting though any maintenance. The main  
> program is nothing more than large set subroutine calls broken down  
> in sections. The  subroutine calls are shared by many modules of  
> the large project.
>

The "best practices" procedure is to use MVC. (Model, View, Control)  
- this provides separation of logic and presentation and  
significantly aids in the long term maintenance of your code. Look at  
Damian Conway's book; Perl Best Practices.

By not following best practices you run the risk of making your code  
write only. An experienced perl programmer would have a hard time  
reading it and re-factor it according to best practices.

Following best practices will significantly increase readability,  
maintenance, and quality of your code.

	Jeremiah
0
jeremiah
9/28/2007 11:54:03 AM
Reply:

Similar Artilces:

PATCH
--=-NaeX8B+RfIpcFK3O5ROB Content-Type: text/plain Content-Transfer-Encoding: 7bit Here are some POD nits (patch is attached). Thanks, Frank --=-NaeX8B+RfIpcFK3O5ROB Content-Disposition: attachment; filename=patch Content-Type: text/x-patch; name=patch; charset=UTF-8 Content-Transfer-Encoding: 7bit --- lib/Switch.pm.orig 2008-12-21 20:41:36.000000000 +0100 +++ lib/Switch.pm 2008-12-21 20:45:41.000000000 +0100 @@ -841,7 +841,7 @@ This boolean expression is inevitably true, since both references are non-false. Fortunately, the overloaded C<'bool'> operator ...

[CGI] CGI.pm parameter hashes
This is the first time I've programmed forms using the CGI module and it's getting very frustrating (and as tedious as Java). After finally going through about three layers of hashes to get to the values of my passed variables, I want to combine them to print them out in human format. Given data like: month=Aug date=12 year=2001 .... I want to produce output like: Date: Aug 12 2001 Here's the code that doesn't work and I think it's because of the way that CGI.pm (as opposed to cgi-lib, i think) represents form data. I think every variable is ...

Contention between Net::LDAPS.pm and CGI.pm
--Boundary-00=_YQ3aErjaD8FoC1l Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a cgi we use to bind to a Sun ONE 5.2 LDAP Server to do password reset. The CGI.pm based app dynamically creates a page with an input textfield for the user's username (uid). Click 'Search' and the script binds to LDAP, retrieves the user's entry, and displays in a 2nd page. That 2nd page has the new password fields. Click 'Reset' button, the script binds to LDAP and modifies the password. Binds to ...

cgi-lib.pl vs cgi.pm
Hello--This is my first post after lurking for a long time-- I have developed a form that uses cgi-lib.pl to process the input. Now the main computer guy has banned cgi-lib.pl for security reasons and says I must use cgi.pm, which is new to me. The form works beautifully with cgi-lib.pl and I would like to avoid rewriting all that code. Does anyone know if cgi.pm is compatible with scripts written for cgi-lib.pl? Unfortunately, the computer's guy attitude is "If you have to ask you wouldn't understand." Thanks David Mooney Community College of Allegheny Count...

RE: cgi-lib.pl vs cgi.pm
David, This is also my first post to this list. I rewrote three scripts last summer switching from cgi-lib to cgi.pm. I wasn't forced to do it. I did it because cgi.pm offered more functionality. I am fairly new to perl (and programming in general) so I viewed this as a good chance to learn something new. I found that cgi.pm is easy to use and resulted in easier to read code. I believe the answer to your question is no, cgi-lib is not compatible with cgi.pm. You have to use either one or the other. I sympathize with you about the computer guys who don't want to explain any...

from CGI to CGI
------=_NextPart_000_0013_01C1A1E1.125E2D80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I have a small problem. I would like to know some function=20 to redirect the control flow from a perl CGI to another perl CGI, e.g.: CGI 1 (at some place) = CGI 2 (at http://www.java.sun.com/manuals/index.cgi) -------- = = -----------------------------------------------------------------------...

Bugzilla::CGI, CGI.pm, perl5.22, and upstream patches
Hey folks, I've recently taken over maintenance of the CGI perl module and have been w= orking my way through the RT issues list. The repo has been moved to github= [1] so you can do the necessary raise issue/fork/raise pull should you wish= .. I've been examining the changelog for Bugzilla::CGI to bring any useful pat= ches into CGI.pm, this is a work in progress[2]. I'd be grateful if any cha= nges you think should be applied within CGI.pm are raised as issues and/or = patches submit if these are appropriate. My aim is to keep CGI.pm back comp= atible in the v4 relea...

AM/PM and am/pm
How do I make the am/pm case insensitive when the user types in the time? For example if I have defined the time format to be "hh:mm AM/PM" and the user types a lower case "a" to change from PM to AM the command is ignored. Thanks, Greg Greg Heiner wrote: > How do I make the am/pm case insensitive when the user types in the > time? For example if I have defined the time format to be "hh:mm AM/PM" > and the user types a lower case "a" to change from PM to AM the command > is ignored. > > Thanks, > Greg I don&#...

\pM and \PM
What are the values of M, what do they mean, and where are they documented? (This is the 5.6.0 UTF8 macro I'm referring to.) -- Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/ Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/ Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/ Acacia Fraternity, Rensselaer Chapter. Brother #734 On Wed, May 02, 2001 at 07:46:30PM -0400, Jeff Pinyan wrote: > What are the values of M, what do they mean, and where are they > documented? (This is ...

Cgi.pm
In order to have perl work as a cgi scripter are any modules besides CGI.pm actually needed?? Bob T On 4/2/02 7:51 PM, Bob T <rjtalbo@attglobal.net> wrote: Hi Bob, > In order to have perl work as a cgi scripter are any modules besides CGI.pm > actually needed?? You need no modules. All you need is a web server with a perl interpreter For instance, the following uses no modules: #!/usr/bin/perl print <<_HTML_; Content-type: text/html <html> <head> <title>test</title> </head> <body> <h1>test</h1>...

CGI.pm > 2.98 breaks CGI::Carp?
I'm working on a large web application with a friend of mine and we thought it would be a good idea to update the modules we were using. Using CPAN.pm we updated CGI, CGI::Session, and several others. It upgraded CGI.pm from 2.93 to 3.00. After the upgrade we noticed that CGI::Carp was not sending correct headers to the browser on fatalsToBrowser and explicit 'die's. It'd just send the error message without any Content type. I just downgraded to 2.98 and everything works again. 2.99 exhibits the same behavior as 3.00. Relevant information: FreeBSD 4.8 perl 5....

CGI.pm situation
Hello, I have a situation here with CGI.pm. Look at this code: my @campos = qw(uno dos tres cuatro cinco) print table({-align=>'center', -width=>'800', -cellspacing=>'1', -cellpadding=>'0', -border=>'0', bgcolor=>'#ffffff'}, Tr( td(\@campos) ), @row, ); the 'td(\@campos)' will be generate five table division because I have put an reference inside it. But if I want to generate the same thing with: print table({-align=>'center', -width=>'800', -cellsp...

CGI.pm popup_menu
I am attempting to use the DEFAULT parameter within a popup_menu to set the displayed value to what I want based on the passed parameters in the URL. I am using Mozilla 0.9.4 on a Linux machine, and hope that isn't the reason I'm not seing what I want to see. Here is the code: ----CODE---- #!/usr/bin/perl -w use CGI qw(:standard); print header, start_html("cgi_pm_test.cgi"); print popup_menu( -NAME => "baths", -VALUES => ["0", "1", "1 1/2", "2"], -LABELS => { 0 => "?????&q...

redirect with cgi.pm
Hello, I have been able to use redirects with cgi.pm as long as the redirect is the only thing in the script. i.e. #!/usr/bin/perl use CGI qw(:standard); print redirect('http://google.com/'); but what i need to do is print a bunch of html , have perl do a few jobs on my system, and then do a redirect when its done. is this possible? thanks, -- jdavis <jd@taproot.bz> >>>>> "Jdavis" == Jdavis <jd@taproot.bz> writes: Jdavis> I have been able to use redirects with cgi.pm as long Jdavis> as the redirect is the on...

CGI.PM and IF statment....
The if statement below does not seem to work as expected// Given in the HTML: <select name=3D"message type"> <option value=3D"0">Choose type message</option> <option value=3D"Comment">Comment about a recent performance or recording</= option> <option value=3D"Booking inquiry">Concert or Event Booking inquiry</option> <option value=3D"Personal message">Personal message</option> </select> and in the perl: #!/usr/local/bin/perl=20 use CGI qw/:standard/; use strict; ...

CGI.pm
------_=_NextPart_001_01C41957.D383AC0C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This might be a little off-topic and/or a double post of which I'm really sorry, but my mail server has done bad things to me lately. I'm 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 the firewall to...

CGI.pm param
------_=_NextPart_001_01C2A862.416C0ABA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello,=20 =20 I'm starting to use CGI.pm to parse input instead of cgi_lib.lib =20 What I need to do is get the values of a series of checkboxes into an = array so I can do foreach over them . =20 EXAMPLE : =20 @check_box_entries =3D $cgi->param('checkboxname'); $check_box_entries =3D $cgi->param('checkboxname'); =20 both just have the first checkbox checked value. =20 What i need to do is basically : =20 ...

CGI.pm program
I have a CGI.pm program that works from the command line, but when I try and view it from the browser, the error_log shows,=20 malformed header from script. Bad header=3D<?xml version=3D"1.0" = encoding=3D": /web/cgi-bin/bb_test/bb_test5.p I don't have these problems when I just use content-type:html, so any idea why this happens when I use the CGI.pm module? Thanks, Taylor On Nov 19, 2004, at 3:49 PM, Lewick, Taylor wrote: > I have a CGI.pm program that works from the command line, but when I > try > and view it from the browser, the error_lo...

Question about CGI.pm
Hi I have been exploring CGI.pm and am of course interested in the HTML escaping procedure. perldoc CGI thrwos up this "By default, all HTML that is emitted by the form-generating functions is passed through a function called escapeHTML(): $escaped_string = escapeHTML("unescaped string"); Escape HTML formatting characters in a string. Provided that you have specified a character set of ISO-8859-1 (the default), the standard HTML escaping rules will be used. The "<" character becomes "&lt;", ">"...

Using CGI.pm
------=_NextPart_000_000E_01C11026.CF1A6620 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Randal, Brian, Stephen, Thanks a bunch for your help with my parsing script. I appreciate it very much. Here�s another problem: Why doesn�t this do what I think it should do? (I just get �Internal server error�) #!c:/perl/bin/perl -w use strict; use CGI qw(param); my ($who,$quote_type,$key); $who = $a->param('firstname')."".$a->param('lastname'); $quote_type = $b->param('submitButtoncattleman'...

Mod_Perl2 CGI.pm
Is mod_perl a replacement for CGI? If just getting involved with perl and the web (Not new to perl) what is the better option mod_perl or cgi? This is on an apache server. I choose mason thinking it was a replacement for both I know see it is not. All though it is great!! But now I need to learn something besides just templating :) Thoughts, Suggestions, .... Paul In Perl can I say: if this =3D that or that or that instead of saying: if this =3D that or this =3D that or this =3D that Cheers, Nigel Managing Director MIS Web Design http://www.miswebdesign....

New to CGI.pm
I've written a perl program to quiz myself using a simple text file as input. Input file: answer = question answer = question etc... When I try to convert this program to a cgi program to use from a web browser, it will not pass the parameters back to the program after drawing the page. I've tried saving the parameter to a variable. I even tried pulling it from the param array, which it appears in. The program starts and presents a menu of test chapters, then after user selection, it exits the program as if I finished the exam. Could someone give me some guida...

Web resources about - CGI.pm - perl.macosx

CGI - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Information technology and business process outsourcing - CGI IT services
CGI is among the leading independent information technology and business process services firms in the world.

CGI101: Web Hosting, Tools, and CGI/Perl Info
Learn CGI Programming! Would you like to learn... How to decode web forms (such as guestbooks, polls/quizzes, and order forms)? How to send form ...

Plusnet CGI - Website Unavailable
Site Archived Please contact our support team for further information.

Mercedes CLS 350 CGI
Explore corleone713's photos on Flickr. corleone713 has uploaded 24 photos to Flickr.

CGI Conversation hosted by CNN's Erin Burnett - YouTube
President Bill Clinton began CGI in 2005 with the idea that leaders across sectors often discussed great solutions worth testing, but needed ...

'The WETA Effect': How CGI and special effects saturation is ruining movies
Filmmakers are using way too much CGI in their movies and its ruining the experience of film watching, according to a new term called "The WETA ...

CGI - Computer Generated Effects In Movies
CGI has revolutionised filmmaking in the past decade, affecting just about every movie we watch.

Alvin and the Chipmunks - The Road Chip review: CGI rodents cause not-so-comic chaos
The Chipmunks' singing is one of the more painful aspects of this enduring family-movie franchise.

New Magic School Bus episodes headed for Netflix in CGI
Meet Hulk, the biggest puppy you'll probably ever see Mar 3, 2015 7:25 PM ET — "These dogs are 100% fearless. They fear nothing. They know no ...

Resources last updated: 2/21/2016 5:28:30 PM