I hope this is of any use - I took it from MySQL Manual:
#!/usr/bin/perl -w
use CGI qw(:standard); #Uses the CGI.pm module
$mycgi = new CGI; #Creates a CGI object (sort of a gateway) for the form
data
@fields = $mycgi->param; #Retrieves the name of the form fields
print header, start_html('CGI.pm test'); #Just some stuff for the start of
the html document
print "<p>Form information:<br>";
foreach (@fields) {print $_, ":", $mycgi->param($_), "<br>"; }
#for each field prints the field name and it's value (this is made using
#$mycgi->param('fieldname')
print end_html; #� um atalho que imprime os tags </body></html>
Pedro Santos
_________________________________
ArteVirtual, Explora��o de Tecnologias de
Informa��o e Comunica��o
Pedro Costa & Santos,Lda.
Rua Barro Branco, Bustelo
Apartado 256
3720 Oliveira de Azem�is
Tel. (351)256602395 - (351)962836722
www.artevirtual.pt
[EMAIL PROTECTED]
_________________________________
----- Original Message -----
From: "ChaoZ Inferno" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 7:24 AM
Subject: How to quote my param in a single step?
Hi,
I am having a slight problem whereby I need to quote the individual params
of my cgi string.
I need to configure 2 steps in order to retrieve the params of my cgi-string
and then quote it in ' '
my $sex = $q->param("sex_question");
$sex = qq('$sex');
print "$sex";
Result : 'male' or 'female'
Is there a simpler method to quote and retrieve the params in a single step?
I tried :-
my $sex = qq('$q->param("sex_question"));
and it's giving me some errors.
Kindly advice pls.
Thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]