Write a program to decode the data in the form using cgi programming
Answer / Roop Singh Rana
Here is an example of a simple CGI (Common Gateway Interface) program that decodes data sent in the form of a URL-encoded string:
#!/usr/bin/perl
use CGI;
my $query = new CGI;
my $data = $query->param('data');
if (defined($data)) {
print "Content-type: text/plainnn";
print decode_uricomponent($data);
} else {
print "Content-type: text/htmlnn";
print "<html><body>Please enter some data to decode.</body></html>";
}
| Is This Answer Correct ? | 0 Yes | 0 No |
I have created a CGI-based page,after entering all the values in to the fields, How to get the output on the web browser using Perl
How will you access an element of a perl array?
How many ways can we express string in Perl?
what is Perl one liner?
What are the advantages of programming in perl?
Define perl scripting?
Explain the functioning of conditional structures in perl.
What is it meants by '$_'?
How many types of primary data structures in Perl and what do they mean?
How do you set environment variables in perl?
How do you find the length of an array?
Explain the meaning of perl one-liner?