http://search.cpan.org/~lds/CGI.pm-3.05/CGI.pm#SETTING_THE_VALUE(S)_OF_A_NAMED_PARAMETER:

$query->param('fooparam','foovalue');
        OR
$query->param(-name=>'fooparam',-value=>'foovalue');
        

$q->param( table => "vendors" );  # INCORRECT
$q->param(-name=>'table',value=>'vendors'); # CORRECT

>>-----Original Message-----
>>From: Ron Wingfield [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, January 04, 2005 2:40 PM
>>To: beginners-cgi@perl.org
>>Subject: Fw: Modifying Parameter Values
>>
>>
>>
>>----- Original Message ----- 
>>From: Ron Wingfield 
>>To: mailto:beginners-cgi@perl.org 
>>Sent: Tuesday, January 04, 2005 2:25 PM
>>Subject: Modifying Parameter Values
>>
>>
>>Hello all,
>>
>>First-timer here.  Please be gentle.
>>
>>I'm posting this question on the Beginners List because the 
>>answer is probably going to be perfectly clear, once I understand it.
>>
>>I've read a lot of doc's, etc. regarding passing parameters 
>>between html documents via the parameter-pairs listed in the 
>>query string of the url.  Additionally, Guelich, Gundavaram 
>>and Birznieks' book, "CGI Programming" (2nd. ed., O'Reilly & 
>>Assoc., 2000), p. 94, explain how to "add" a new parameter to 
>>the query string via the url, e.g., the results of executing 
>>the following instruction:
>>
>>   $q->parm( title => "Web Developer" );
>>
>>will appear as "&title=Web+Developer" in the query string.  
>>This works, but the authors suggest that a parameter can be 
>>"modified" and/or "deleted", too.  I have assumed that this 
>>means that the parameter value in the url's query string can 
>>be (should be) modified as in changed?  I cannot change a 
>>value, or delete a parameter from the query string in the 
>>url.  If for example, I have a parameter, "table", that 
>>originates in pgm-A but is not assigned no value, then when 
>>the parameter is presented to pgm-B, the query string has a 
>>value of "&db_name=cookbook&table=&etc=etc".  Notice that 
>>"&table=" is not associated with a value.  If I execute an 
>>instruction such as:
>>
>>   $q->param( table => "vendors" );
>>
>>. . .the result is:  
>>"&db_name=cookbook&table=&etc=etc&table=vendors".    Notice 
>>that the operation did not change the value of the existing 
>>"table" parameter, but "pushed" or ADDED another 
>>"table=vendors" pair onto the query string.   Also, as the 
>>authors suggested, I have tried to execute:
>>
>>   $q->delete( "table" ); 
>>
>>. . .but this will not delete or otherwise remove the "table" 
>>parameter from the query string.  Also, I've been scanning 
>>through the source for CGI.pm, and apparently there is not a 
>>packaged subroutine for something like "$q->modify( "table" );".
>>
>>Suggestions?
>>
>>Ron Wingfield
>>
>>FreeBSD 4.8  --  Apache http 2.0.28 -- MySQL client/server 4.1.7
>>Perl 5.8.5 -- p5-DBD-mysql-2.9004 driver -- p5-DBI-1.46
>>
>>--------------------------------------------------------------
>>------------------
>>


-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to [EMAIL PROTECTED] and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature
for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act ("E-Sign")
unless a specific statement to the contrary is included in this message.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to