Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



I have created a CGI-based page,after entering all the values in to the fields, How to get the out..

Answer / guest

In the form Action you have to specify the (perl) program,
you want to execute on submitting this form.

Is This Answer Correct ?    2 Yes 0 No

I have created a CGI-based page,after entering all the values in to the fields, How to get the out..

Answer / suvvari

In the HTML form, you have to mention the perl script name.
Ex: <form action="test.pl" method="POST">. Then in the
test.pl, you have to mention the content-type as
print "content-type: text/html\n\n";. And read the form
values and print them.

Is This Answer Correct ?    1 Yes 0 No

I have created a CGI-based page,after entering all the values in to the fields, How to get the out..

Answer / raghav

Including the First two answers also go thru CGI.pm module.
or else you can also use the cgi-lib.pl.
Go through the docs of the modules.

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 out..

Answer / vipul dalwala

print "content-type: text/html\n\n";.

if ($ENV{’REQUEST_METHOD’} eq ’POST’) {
read(STDIN, $buffer, $ENV{’CONTENT_LENGTH’});
}
else {
$buffer = $ENV{’QUERY_STRING’};
}

@keyvaluepairs = split(/&/, $buffer);

foreach $pair (@keyvaluepairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex
($1))/eg;
print $name . "=". $value ."<br>";
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

Write an expression or perl script to identify the entered ip address is valid or not?

5 Answers   HCL,


Differences between die and exit.

0 Answers  


What is the difference between for & foreach, exec & system?

9 Answers   Photon, Wipro,


“Perl regular expressions match the longest string possible”. What is the name of this match?

0 Answers  


Define operators used in perl?

0 Answers  


write a perl script to find whether a given line of text is starting and ending with same word or not ???

2 Answers   CSS,


What syntax is used for grep() function?

0 Answers  


Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

0 Answers  


Explain what is lvalue?

0 Answers  


How to copy a file in perl?

0 Answers  


Which of these is a difference between Perl and C++ ?

0 Answers  


you are required to replace a char in a string and store the number of replacements. How would you do that?

0 Answers  


Categories