adspace
Write a program to decode the data in the form using cgi programming
Answer Posted / 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 |
Post New Answer View All Answers
There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"
How do find the length of an array?
How to connect to SQL server through Perl?
What is perl? What is the basic command to print a string in perl?